kibi-cursor 2.9.1 → 2.9.3

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.
Files changed (40) hide show
  1. package/.cursor-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +82 -0
  3. package/agent-plugin/plugin.json +1 -1
  4. package/agent-plugin/skills/kibi-bootstrap/SKILL.md +2 -2
  5. package/agent-plugin/skills/kibi-commit-review/SKILL.md +4 -3
  6. package/agent-plugin/skills/kibi-commit-review/resources/staged-gate.md +6 -1
  7. package/agent-plugin/skills/kibi-decisions/SKILL.md +10 -2
  8. package/agent-plugin/skills/kibi-decisions/resources/decision-records.md +6 -1
  9. package/agent-plugin/skills/kibi-decisions/resources/signoff-views.md +3 -2
  10. package/agent-plugin/skills/kibi-freshness/SKILL.md +5 -1
  11. package/agent-plugin/skills/kibi-traceability/SKILL.md +11 -1
  12. package/agent-plugin/skills/kibi-usage/SKILL.md +6 -4
  13. package/agent-plugin/skills/kibi-usage/resources/proof.md +124 -19
  14. package/agent-plugin/skills/kibi-usage/resources/workflows.md +4 -4
  15. package/dist/.cursor-plugin/plugin.json +1 -1
  16. package/dist/skills/.canon-hash.json +11 -11
  17. package/dist/skills/kibi-bootstrap/SKILL.md +2 -2
  18. package/dist/skills/kibi-commit-review/SKILL.md +4 -3
  19. package/dist/skills/kibi-commit-review/resources/staged-gate.md +6 -1
  20. package/dist/skills/kibi-decisions/SKILL.md +10 -2
  21. package/dist/skills/kibi-decisions/resources/decision-records.md +6 -1
  22. package/dist/skills/kibi-decisions/resources/signoff-views.md +3 -2
  23. package/dist/skills/kibi-freshness/SKILL.md +5 -1
  24. package/dist/skills/kibi-traceability/SKILL.md +11 -1
  25. package/dist/skills/kibi-usage/SKILL.md +6 -4
  26. package/dist/skills/kibi-usage/resources/proof.md +124 -19
  27. package/dist/skills/kibi-usage/resources/workflows.md +4 -4
  28. package/package.json +2 -2
  29. package/skills/.canon-hash.json +11 -11
  30. package/skills/kibi-bootstrap/SKILL.md +2 -2
  31. package/skills/kibi-commit-review/SKILL.md +4 -3
  32. package/skills/kibi-commit-review/resources/staged-gate.md +6 -1
  33. package/skills/kibi-decisions/SKILL.md +10 -2
  34. package/skills/kibi-decisions/resources/decision-records.md +6 -1
  35. package/skills/kibi-decisions/resources/signoff-views.md +3 -2
  36. package/skills/kibi-freshness/SKILL.md +5 -1
  37. package/skills/kibi-traceability/SKILL.md +11 -1
  38. package/skills/kibi-usage/SKILL.md +6 -4
  39. package/skills/kibi-usage/resources/proof.md +124 -19
  40. package/skills/kibi-usage/resources/workflows.md +4 -4
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kibi-cursor",
3
3
  "displayName": "Kibi",
4
- "version": "2.9.1",
4
+ "version": "2.9.3",
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,87 @@
1
1
  # kibi-cursor
2
2
 
3
+ ## 2.9.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 94dc89d: A certificate now proves the requirement claims it names, and `proved` says which claims a requirement's certificates cover.
8
+
9
+ A certificate-kind proof contract (`exhaustive`, `typecheck`, `arithmetic`, `smt`) names the claim keys it proves in the new `proves` field. For each named claim Kibi derives what the certificate has to establish from the claim's grounding fact, so the author never states it:
10
+ - A set fact (the new `value_type: set` with `value_set`) gives a set-equality obligation. An `exhaustive` certificate meets it when its domain, read from the code, is exactly the set and the domain symbol is covered by the test; a `typecheck` certificate meets it when Kibi's own witness, which compares the domain type with the set both ways, compiles.
11
+ - A numeric fact gives a constraint. An `arithmetic` or `smt` certificate meets it when its assumptions are the fact's constraints; a new `value_source` field names the code constants that bound the variable, which `constraint_source` used to require.
12
+ - A fact with no derivation (a behavioral claim) gives an attested binding, which counts as `tested`.
13
+
14
+ `kibi prove` records one binding per claim in the receipt's `claim_bindings` (derived, attested or rejected, with the reason) and prints it. Kibi re-judges each binding against the current KB when it reports, so a binding goes stale when its fact changes. A requirement reports `proved` only when every applicable claim has a derived, code-scope binding from a fresh certificate that re-checks.
15
+
16
+ The semantic advisor now models closed lists ("must be one of red, green or blue") as set facts. KB consistency certificates support set facts.
17
+
18
+ `kibi coverage`, `kibi proof explain` and the HTML report show claim-level evidence (`claimSummary`, `claimEvidence`, "n/m claims proved"), and the `proved` floor gap lists the unproved claims. The new blocking `proof-contract-claims` check reports a certificate contract that names no claims, names a key that is no current claim, or names a claim its kind cannot express. The kibi-usage (2.27.0) and kibi-traceability (2.2.0) skills explain claim binding to agents.
19
+
20
+ **Migration (breaking):** KB schema 12. `kibi migrate` pins `proves` on every certificate contract with exactly one claim it could prove and lists the rest for review; until a contract names its claims, `proof-contract-claims` blocks and its certificate proves nothing. A requirement that reported `proved` from a certificate before reports `tested` until its claims are bound and re-proved. The requirement proof payload is now `kibi.requirement-proof.v5`. Facts with a legacy `allowed_values` list are read as sets; nothing is rewritten.
21
+
22
+ - a71798f: Proof contracts can now earn `proved` evidence with certificate proof kinds that Kibi re-checks itself.
23
+
24
+ A proof contract sets `kind` to one of the runner kinds `e2e`, `example` or `property`, which support `tested`, or to a certificate kind, which supports `proved`:
25
+ - `exhaustive` runs a check on every member of a finite domain the code defines. The contract names the domain with `domain_source`; the proof must import that symbol, and Kibi loads the export itself and rejects a certificate that does not cover exactly its members.
26
+ - `typecheck` names a `witness` file that stops compiling when a domain member goes unhandled (an exhaustive switch ending in a `never` check, or a mapped type over the domain). Kibi compiles the witness itself, strict and with the workspace's TypeScript, and checks it is the workspace file and imports the domain.
27
+ - `arithmetic` states a claim about one integer or real variable. Its assumptions must be exactly the constraints of the typed numeric facts the contract names in `constraint_source`, and Kibi decides the claim exactly: the facts must be satisfiable and entail it for every value.
28
+ - `smt` carries an SMT-LIB query that asserts the `constraint_source` facts and the claim's negation. Kibi re-runs z3 or cvc5 on it and accepts only `unsat`.
29
+
30
+ `arithmetic` and `smt` prove that the knowledge base's facts entail a claim, not that code follows those facts.
31
+
32
+ Tests build certificates with the new `kibi-cli/proof-certificates` helpers and leave them in the directory `kibi prove` names in `KIBI_PROOF_CERTIFICATES`; outside `kibi prove` writing a certificate does nothing. A requirement reports `proved` when it is `tested` and every scenario has a test whose fresh receipt carries a certificate that still re-checks. `kibi coverage`, `kibi proof explain` and the report show the new certificate evidence, the report counts requirements proved by certificate, and a stored certificate that stops re-checking is listed with its reason under `certificateRejections`.
33
+
34
+ **Receipts:** `kibi prove` now writes `kibi.proof-receipt.v2`, which adds the contract kind, the evidence level, the certificate, its digest and, when a certificate is rejected, the reason. Existing `kibi.proof-receipt.v1` receipts stay valid and support `tested`. Older Kibi versions do not read v2 receipts, so upgrade every checkout that proves requirements together. The kibi-usage skill (2.26.0) explains certificate kinds to agents.
35
+
36
+ - 0d68081: Requirements now state the evidence they need, and `kibi check` fails any current requirement whose evidence is below it.
37
+
38
+ A requirement can set `required_evidence` to `proved`, `tested`, `asserted` or `unverified`. Without it, a firm requirement needs `tested` evidence and any other requirement needs none. The new canonical `evidence-floor` rule of `kibi check` and `kb_check` reports every current requirement whose evidence level is below its floor, with the level, the floor, where the floor comes from and the proof gaps to fix. Requirements whose only gaps are receipts older than the code count as pending re-proof and pass; `kibi check --fresh-evidence`, meant for CI right after `kibi prove --all`, fails them and also needs a clean proof snapshot.
39
+
40
+ The floor replaces snapshot files of every requirement's proof gaps: a pull request that adds a requirement no longer edits a shared baseline, and the floor sits in the requirement a reviewer reads. `kibi proof impact`, which compared coverage with such a baseline, is removed; use `kibi check --rules evidence-floor` and `kibi proof explain <id>`.
41
+
42
+ **Migration:** the knowledge-base schema moves to version 11. `kibi migrate` writes `required_evidence: asserted` on every current firm requirement that has no scenario verified by an end-to-end test with a proof contract and a passing receipt, so an upgraded knowledge base passes; raise a floor to `tested` once the requirement has an end-to-end proof. Requirements that keep `tested` are listed, and `kibi check --rules evidence-floor` shows any whose proof still has gaps, such as a stale receipt. For the same reason, requirements `kibi bootstrap` imports from a person's documents are recorded with `required_evidence: asserted`, so a freshly bootstrapped knowledge base passes `kibi check`. A knowledge base below schema 11 is not judged by `evidence-floor` until it is upgraded. The kibi-usage skill (2.25.0) explains floors to agents.
43
+
44
+ - 1fea8f6: Fixes from running the formal-proof lane on two test projects.
45
+
46
+ **Migration note:** a type-shape symbol (interface, type alias, enum) covered by a unit test now counts as covered only while that unit test has a current passing receipt; an authored `status: passing` is no longer enough. After upgrading, give those unit tests a `proof_contract` and run `kibi prove --stale`. Until then coverage lists the symbols in `uncoveredSymbols` with `structural_unit_receipt_not_current`.
47
+ - `kibi migrate` pins a `tested` floor only where the proof ladder would accept it (newest receipt, every gap), so a migrated project no longer starts with dozens of `evidence-floor` violations.
48
+ - `kibi check` prints the evidence-floor suggestion in text output without `--fix`, and the suggestion names the failing receipts, uncovered symbols and missing coordinates.
49
+ - `kibi coverage --status` judges receipts with the same per-contract binding as the unfiltered report.
50
+ - Certificate domains: `domain_source.export` names the export when it differs from the symbol title; TypeScript domains load through bun, the workspace's tsx, or node with a resolve hook for extensionless and `.js` imports; imports of compiled output map back to sources through `tsconfig.json`; Python domains (`Enum`, `dict`, list, tuple, set) load with `python3`.
51
+ - An exported constant matched by name is judged as a narrow symbol by the upsert granularity check, as the staged gate and `kibi check` already did.
52
+ - `kibi prove` no longer prints a raw `git show` error for a newly added test document, attributes a valid all-pass test report per test, and stops the producer's whole process group on Ctrl-C.
53
+ - New `kibi prove --stale` reruns only tests without a current passing receipt.
54
+ - New `success_policy: own_results_first_attempt` judges each obligation by its own native-case result when a run failed only in execution, so one unrelated failing Playwright case no longer fails every receipt of the suite. The Playwright reporter now marks global errors (`setup`), global timeouts (`timed_out`) and interruptions as run-level failures, which still refuse every obligation.
55
+ - `kibi prove` prints each integration it starts and ingests on stderr, records ingested integrations in `.kb/proof/runs/prove-progress.json`, and `kibi prove --resume` skips integrations an interrupted run already ingested at the same snapshot.
56
+ - With `--test`, `--requirement` or `--stale`, a direct `playwright test` integration runs only the selected tests' `proof_bindings[].source_file` spec files; every producer receives them as `KIBI_PROOF_SOURCE_FILES`.
57
+ - New `kibi proof run-steps` runs `proof/steps.json` as a `command` integration and writes the per-test report.
58
+ - Receipt binding ignores a test document's `links`, so adding a link no longer stales its receipts; receipts bound the earlier way stay current.
59
+ - The tree-sitter analyzer keeps a file with more than 64 decorated declarations decorator-only (the last diagnostic summarizes the rest), so `kibi sync --refresh-symbol-coordinates` no longer aborts on it.
60
+ - `kibi sync --refresh-symbol-coordinates` counts refreshed symbols against the stored coordinate artifact.
61
+ - New `coarse_anchor_only_review` diagnostic for requirements implemented only by whole-file anchors.
62
+ - `kibi proof inspect` detects `node --test` and `bun test` in root and workspace scripts.
63
+ - `kibi doctor` warns instead of failing when an augment-mode plugin's secret is missing, and the merge-driver setup names the project's package manager.
64
+ - `kibi coverage` text output groups traceability and proof counts.
65
+ - Claim texts that differ only in whitespace or trailing punctuation match.
66
+ - `pack:all -- --dev-version` stamps local packs `<version>-dev.<sha>`.
67
+
68
+ - 26bfdd6: Close the remaining proof-lane issues.
69
+ - `kibi upsert` keeps the properties an update leaves out in the compiled store, as the authored file already did. A relationship-only upsert no longer drops `required_evidence` (or `priority`, `owner`, `tags` and the rest) from the stored requirement, so `evidence-floor` stops judging it by firmness until a `kibi sync --rebuild`.
70
+ - A Python certificate domain loads with `KIBI_PYTHON`, the active virtualenv, or a `.venv`/`venv` from the domain file's directory up to the workspace root before `python3` on `PATH`, so a domain that imports project dependencies is checked. A failed load quotes the traceback's exception line (`ModuleNotFoundError: ...`) instead of its header.
71
+ - The `kibi coverage` summary carries `linkCoverageScope: "priority_must"`, and the table titles the link counts `Links (priority: must)`, so `evaluated: 0` on a KB without must-priority requirements no longer reads as if nothing was proved.
72
+ - `kibi sync` counts distinct relationships in both summary blocks: an edge stated in front matter and again in a symbol manifest or shard counts once, so the imported count no longer exceeds the KB total.
73
+ - After an applied migration, `remainingPlan` is a `kibi.migration-plan-digest.v2`: it lists the first 20 automatic actions as `{ id, code, state, autoApplicable, dependsOn }` and counts all of them under `automaticSummary` (`total`, `ready`, `blocked`, `omitted`), instead of embedding every automatic action with its full input.
74
+
75
+ - e421be0: Skills describe evidence levels and floors. kibi-decisions and kibi-bootstrap record an untested firm rule with `required_evidence: asserted` so `kibi check` passes until an end-to-end proof covers it. kibi-traceability and kibi-freshness report `evidenceLevel` and `evidenceFloor` from coverage. The kibi-commit-review staged gate reference lists `kb-consistency` and notes that `evidence-floor` runs only in a full check. The kibi-usage receipt workflow runs `kibi prove` and appends `kibi.proof-receipt.v2` receipts instead of deriving them by hand.
76
+
77
+ ## 2.9.2
78
+
79
+ ### Patch Changes
80
+
81
+ - 45036a3: Signoff guidance no longer tells agents to attach `latest.html` as a file. Chat apps (the Claude apps, Slack and most others) show an attached HTML file as raw source or a download, so agents now share the page only as a rendered page, such as a Claude Artifact, and otherwise leave the message text as the whole view. Updates the kibi-decisions and kibi-commit-review skills (1.2.1), the `kibi signoff` page note and the stop-hook reminder.
82
+ - Updated dependencies [45036a3]
83
+ - kibi-agent-core@0.9.1
84
+
3
85
  ## 2.9.1
4
86
 
5
87
  ### Patch Changes
@@ -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.9.1",
4
+ "version": "2.9.3",
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/",
@@ -2,7 +2,7 @@
2
2
  id: kibi-bootstrap
3
3
  name: kibi-bootstrap
4
4
  description: "Use for any Kibi bootstrap or onboarding task: seeding a new or thin knowledge base; reviewing a bootstrap or onboarding plan, preview, or evidence; judging approval readiness or coverage; diagnosing a blocked, partial, or failed bootstrap or its repair; applying an approved bootstrap plan; or asking the human which knowledge sources hold intent. Covers kb_status first, source interview, cited intent claims, read-only kb_plan_bootstrap preview, explicit approval, exact-plan kb_apply_plan, and repair-safe close-out."
5
- version: 3.16.0
5
+ version: 3.17.0
6
6
  kibiCompatibility: ">=1.0.0"
7
7
  tags:
8
8
  - kibi
@@ -43,7 +43,7 @@ Seed branch-local Kibi knowledge from cited product intent, without creating a p
43
43
  9. **Read back** with `kb_query` and `kb_search` to confirm writes and citations.
44
44
  10. **Close out** with `kb_check`, then `kb_status`.
45
45
  11. **Deepen.** Bootstrap is complete; the KB is now half-way, holding cited `req` entries and review facts but no scenarios, tests or predicates. Load `kibi-usage` and continue in the normal Kibi workflow, one area at a time, telling the human what you author:
46
- - **Unplanned claims.** For every claim suppressed as `invalid_write` and every `sourceOnlySignals` entry ("Author requirement …"), restate the claim's statement and citation (`sourceId:reference`), model it with `kb_model` (`mode: "requirement"`, or `mode: "predicates"` for domain claims), and write the result with `kb_upsert` (`dryRun: true` first) with `origin: {kind: "import", ref: "<sourceId:reference>"}` and `firmness: "firm"`, as the plan does for the claims it writes. Without an explicit origin `kb_upsert` records the requirement as the agent's own `default` choice, which a later agent may supersede without asking.
46
+ - **Unplanned claims.** For every claim suppressed as `invalid_write` and every `sourceOnlySignals` entry ("Author requirement …"), restate the claim's statement and citation (`sourceId:reference`), model it with `kb_model` (`mode: "requirement"`, or `mode: "predicates"` for domain claims), and write the result with `kb_upsert` (`dryRun: true` first) with `origin: {kind: "import", ref: "<sourceId:reference>"}` and `firmness: "firm"` and `required_evidence: "asserted"`, as the plan does for the claims it writes; raise the floor (drop `required_evidence`) only once an end-to-end proof covers the requirement. Without an explicit origin `kb_upsert` records the requirement as the agent's own `default` choice, which a later agent may supersede without asking.
47
47
  - **Scenarios.** Write scenarios from the cited ticket's acceptance criteria, one scenario per criterion, not bulk drafts from the requirement title; ask the human when the source states none. Give each a plain title, the scenario prose in `document.body` (never in `properties`), and `assumes` links to the `property_value` facts whose values the scenario relies on. Set `expects` only when the scenario links `assumes` facts (or its criterion names concrete values that become them); `expects` without `assumes` only yields a feasibility-unknown warning, so a draft tagged `needs-human-review` omits `expects`. Then link the requirement with `specified_by` (upsert the `req` with its stored `title`, a `status` and that relationship only). Example: criterion "Given an annotation in draft state, when the user deletes it, the draft is cleared" becomes `{"type":"scenario","id":"SCEN-annotation-delete-clears-draft","properties":{"title":"Deleting a draft annotation clears the draft","status":"active","expects":"success"},"document":{"body":"Given an annotation in draft state, when the user deletes it, then the draft is cleared and nothing is published.\n\nThe acceptance criterion comes from the cited ticket; reviewers asked for it so a deleted draft never reappears after reload.\n"},"relationships":[{"type":"assumes","from":"SCEN-annotation-delete-clears-draft","to":"FACT-annotation-state-draft"}]}`, where the assumed fact is a `property_value` (`annotation.state` `eq` `draft`). Link existing tests that exercise it; never invent test evidence.
48
48
  - **Predicates.** Run `kb_model` with `mode: "predicates"` and `requirementId` on each persisted requirement and apply a returned plan with `requires_predicate` to its `relationshipTarget` (the planned `FACT-PRED-…` id, never a `SUGGEST-…` candidate id), or record the `review:ontology-gap` observation it returns, with its prose in `document.body`. A non-empty `existingGrounding` means the bootstrap already grounded that claim: on `replace_grounding` leave it unless the human wants the `replacementPlan` swap; on `provide_argument_bindings` retry with the listed arguments bound; on `record_ontology_gap` still write the returned gap observation, which is not a grounding link. Count what `kb_query` shows afterwards, not the calls you made.
49
49
  - **Unrecorded ambiguity.** Record any conflict or open question you found but did not declare in step 3 as a cited `fact_kind: observation` tagged `review:conflict` or `review:open-question`.
@@ -2,7 +2,7 @@
2
2
  id: kibi-commit-review
3
3
  name: kibi-commit-review
4
4
  description: "Use when kibi check --staged or the Kibi pre-commit hook blocks a commit (kibi_impact_evidence_missing, symbols_manifest_stale, symbol_granularity_violation, symbol-coverage, kibi check-generated drift, Staged impact review failed), or when preparing a commit or pull-request impact review. Covers reading the per-file Detail lines, authoring .kb/symbols.yaml symbol entries through kb_upsert, kibi sync --refresh-symbol-coordinates, staging the tracked Kibi evidence with git add, kb_prepare_impact_review for a staged or diff scope, the kibi signoff requirements summary to show before a commit, and how merge commits and migration renames are judged."
5
- version: 1.2.0
5
+ version: 1.2.2
6
6
  kibiCompatibility: ">=1.0.0"
7
7
  tags:
8
8
  - kibi
@@ -85,8 +85,9 @@ requirement with its statement (before and after for a rewrite), firmness,
85
85
  origin, scenarios and proof state. Put it in your reply unchanged (in the
86
86
  messaging tool's message when replies go through one), then add one or two
87
87
  sentences on why the requirements changed. Offer the full page with
88
- `kibi signoff --format html --open`, or attach or publish
89
- `.kb/briefs/signoff/latest.html` when your host can carry a file or a page;
88
+ `kibi signoff --format html --open`, or publish `.kb/briefs/signoff/latest.html`
89
+ as a rendered page when your host has a page tool (the Artifact tool in Claude
90
+ apps); never attach the `.html` as a file, which chat apps show as raw source;
90
91
  past 15 requirements the Markdown stops and only the page lists them all.
91
92
  Host details: `kibi-decisions`, `resources/signoff-views.md`. `--no-proof` skips the proof lookup, which reads coverage and is slow
92
93
  on a large knowledge base. The summary is not an approval: never set
@@ -30,11 +30,16 @@ symbols_manifest_stale: .kb/symbol-coordinates.yaml is stale or missing for stag
30
30
  | `symbol-coverage` | A changed symbol, or a symbol whose staged manifest entry changed, fails the full-check rule on the staged knowledge. | The symbol `implements` the requirement and is `covered_by` a test that verifies it: through the requirement's scenario (`verified_by` scenario -> test) when it has one, else `verified_by` requirement -> test. A direct requirement -> test link does not count while a scenario exists. The finding's suggestion names the missing link (see `kibi-traceability`). |
31
31
  | `kibi_impact_override_missing_rationale` | A `Kibi-Impact: none` declaration has no `Rationale:` line. | Add the rationale, or drop the declaration and stage real evidence. |
32
32
  | `entity-context-missing` (staged entity) | A staged requirement, scenario, test, ADR or observation fact has fewer than 12 words of context. | Upsert a sectioned `document.body` (see `kibi-usage`, Entity body contract). |
33
- | `domain-contradictions`, `scenario-feasibility`, `exception-claim-keys` (staged `.kb/` change) | The staged knowledge introduces a violation the last commit did not have. | Fix the knowledge; a contradiction with a recorded rule goes to the person (`kibi-decisions`). |
33
+ | `domain-contradictions`, `kb-consistency`, `scenario-feasibility`, `exception-claim-keys` (staged `.kb/` change) | The staged knowledge introduces a violation the last commit did not have. `kb-consistency` also catches facts that contradict only together and names their requirements. | Fix the knowledge; a contradiction with a recorded rule goes to the person (`kibi-decisions`). |
34
34
  | Proposition-complete ingestion | A staged requirement's semantic inventory is missing or no longer matches its prose. | Re-derive it (`kb_model` analyze with the complete prose) or run `kibi migrate` for drift. |
35
35
  | `kibi check-generated --staged` drift | The staged `.kb/symbols.yaml` or `.kb/symbol-coordinates.yaml` differs from a refresh computed from the index. | `kibi sync --refresh-symbol-coordinates`, review the diff, stage only the intended hunks (`git add -p`). |
36
36
  | `Staged impact review failed: impact_review_invalid: ...` | The base commit has `.kibi/impact-policy.json` and the staged `.kibi/impact-review.json` is missing, stale or incomplete. The message names the cause (missing review path, stale fingerprint, ...). | Prepare a fresh record (below). Any later staged change makes the fingerprints stale again, so prepare it last. |
37
37
 
38
+ The staged gate does not judge evidence levels: the `evidence-floor` rule
39
+ runs only in a full `kibi check`. A firm requirement staged without an
40
+ end-to-end proof passes the commit and fails that check later (see
41
+ `kibi-decisions` for `required_evidence`).
42
+
38
43
  ## Advisory findings
39
44
 
40
45
  These warn but do not block. Read them; they are often the real review.
@@ -2,7 +2,7 @@
2
2
  id: kibi-decisions
3
3
  name: kibi-decisions
4
4
  description: "Use when the person states a rule or decision (must, never, always, from now on, we decided), when a Kibi hook asks to confirm or warns about an edit to code that implements a firm requirement, when the Stop hook says source files changed but nothing was recorded, when kb_check quotes requirement_statement_unverified, or when a request conflicts with a recorded requirement or ADR. Covers reading firmness and origin, recording a person's rule as firm with origin.ref, superseding with a Why this changed section, the kb_compile_intent unresolved/reviewCandidates/conflictReviews loop, asking before overriding a firm rule, and putting decisions to the person as one numbered kibi signoff --questions view."
5
- version: 1.2.0
5
+ version: 1.3.0
6
6
  kibiCompatibility: ">=1.0.0"
7
7
  tags:
8
8
  - kibi
@@ -74,6 +74,13 @@ name the missing capability. Never read or edit `.kb/` files directly.
74
74
  quoting their words and where they said them, a sectioned `document.body`,
75
75
  a scenario, and an `implements` link from the code that enforces it. Use
76
76
  `kb_compile_intent` first when the rule may touch several requirements.
77
+ A firm rule needs `tested` evidence by default, so `kb_check`'s
78
+ `evidence-floor` rule fails on it until an end-to-end test proves its
79
+ scenario. When the change includes that test, give it a proof contract and
80
+ run `kibi prove`. Otherwise set `required_evidence: asserted`, say in the
81
+ body that no end-to-end test proves the rule yet, and report it as
82
+ asserted, not tested. Kibi's bootstrap and migration give an untested firm
83
+ rule the same floor.
77
84
  - **The person changes a rule:** supersede it (new requirement linked
78
85
  `supersedes` new -> old, `firmness: firm` when the old one was firm, a
79
86
  `## Why this changed` section of at least 12 words naming their instruction
@@ -124,7 +131,8 @@ Validation is not completion. When a request conflicts with a recorded rule and
124
131
 
125
132
  End with `kb_check` (and `kb_status` when freshness matters) and say:
126
133
 
127
- - which rules you followed, asked about, recorded or changed (ids, firmness);
134
+ - which rules you followed, asked about, recorded or changed (ids, firmness,
135
+ evidence level);
128
136
  - under "Decisions I changed", each supersede and its evidence;
129
137
  - the open question, if a conflict is waiting on the person;
130
138
  - or, when the session made no decision, one line saying so.
@@ -43,7 +43,7 @@ says it, link to it instead of restating it. Otherwise write the scenario
43
43
  first, then the requirement (the requirement's write sends `specified_by`):
44
44
 
45
45
  ```json
46
- {"type":"req","id":"REQ-billing-refund-approval","properties":{"title":"Refunds above 500 EUR need a finance approval","status":"open","priority":"must","firmness":"firm","origin":{"kind":"agent","ref":"session request: \"from now on refunds above 500 EUR must be approved by finance\""}},"relationships":[{"type":"specified_by","from":"REQ-billing-refund-approval","to":"SCEN-billing-refund-approval"}],"document":{"body":"Refunds above 500 EUR need a finance approval.\n\n## Context\n\nThe person asked for this rule while changing the refund flow; reason not stated.\n\n## Source\n\n> from now on refunds above 500 EUR must be approved by finance\n\nSession request."}}
46
+ {"type":"req","id":"REQ-billing-refund-approval","properties":{"title":"Refunds above 500 EUR need a finance approval","status":"open","priority":"must","firmness":"firm","required_evidence":"asserted","origin":{"kind":"agent","ref":"session request: \"from now on refunds above 500 EUR must be approved by finance\""}},"relationships":[{"type":"specified_by","from":"REQ-billing-refund-approval","to":"SCEN-billing-refund-approval"}],"document":{"body":"Refunds above 500 EUR need a finance approval.\n\n## Context\n\nThe person asked for this rule while changing the refund flow; reason not stated. No end-to-end test proves it yet.\n\n## Source\n\n> from now on refunds above 500 EUR must be approved by finance\n\nSession request."}}
47
47
  ```
48
48
 
49
49
  Then link the enforcing symbol with `implements` (and its test with
@@ -58,6 +58,11 @@ validation, not the write.
58
58
  `origin.approved_by` to the person.
59
59
  - A rule from a document, test or ticket a person wrote is `firm` too, with
60
60
  `origin.ref` to that source.
61
+ - `required_evidence: asserted` keeps an untested firm rule from failing
62
+ the `evidence-floor` check while it is recorded. Drop it (the floor goes
63
+ back to `tested`) once an end-to-end test with a proof contract and a
64
+ passing `kibi prove` receipt covers the rule's scenario; never set it below
65
+ `asserted` on a firm rule.
61
66
  - Your own choice is `default`; a guess is `exploratory`. Write the value
62
67
  explicitly whenever you record a decision.
63
68
  - For strict modeling (claim keys, predicate facts) follow `kibi-usage`,
@@ -13,7 +13,8 @@ statements and lists that render in any chat or messaging surface. Put it in
13
13
  your reply unchanged: never wrap it in a code block, summarize it or retell a
14
14
  requirement in your own words. Every run also writes
15
15
  `.kb/briefs/signoff/latest.json`, `latest.md` and `latest.html` (git-ignored);
16
- `latest.html` is a self-contained page with the full view.
16
+ `latest.html` is a self-contained page with the full view, meant to be opened
17
+ in a browser or published as a page, not attached as a file.
17
18
 
18
19
  ## Showing it on your host
19
20
 
@@ -21,7 +22,7 @@ requirement in your own words. Every run also writes
21
22
  | --- | --- |
22
23
  | Claude Code, Codex, Cursor, ZCode, VS Code chat | Paste the default output; `/kibi-signoff` (Claude Code, Cursor, ZCode) runs it. Offer `kibi signoff --format html --open` for the page |
23
24
  | OpenCode terminal | `kibi signoff --format md` and paste the fenced block unchanged: kibi-opencode draws it as a card, and `/kibi-signoff` reopens it |
24
- | Replies sent through a messaging tool (cloud or project threads, chat bots) | Pass the default output as the message text, and attach or publish `.kb/briefs/signoff/latest.html` next to it when the tool can carry a file or a page |
25
+ | Replies sent through a messaging tool (cloud or project threads, chat bots) | Pass the default output as the message text. Share `latest.html` only as a rendered page: in Claude apps (claude.ai, the mobile and desktop apps, Claude Code on the web) publish it with the Artifact tool and give its link. Never attach the `.html` as a file: the Claude apps, Slack and most chat apps show it as raw source or a download. With no page tool, the message text is the whole view |
25
26
  | VS Code or Cursor with the kibi-vscode extension | The **Kibi: Show Requirements Signoff** panel follows every run |
26
27
  | Remote machine, no browser | Give the person the path of `latest.html` |
27
28
 
@@ -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.1.0
5
+ version: 2.2.0
6
6
  kibiCompatibility: ">=1.0.0"
7
7
  tags:
8
8
  - kibi
@@ -66,6 +66,10 @@ For every freshness, branch, or completion question, call `kb_status` first, the
66
66
  evidence-dependent closeout. Name the exact paths/symbol IDs and whether the
67
67
  result is fixed, accepted, or deferred.
68
68
  - If entities look stale, refresh context through an approved Kibi capability and then re-query.
69
+ - When asked whether a requirement is proven, quote its `evidenceLevel` and
70
+ `evidenceFloor` from `kb_coverage`. `pending_reproof` (receipts older than
71
+ the code) is stale evidence, not proof; `kibi prove` refreshes it, and
72
+ `kibi check --fresh-evidence` is the check that fails on it.
69
73
  - Preserve source-file traceability by carrying `sourceFile`, text references, and validation evidence through discovery, mutation, and completion.
70
74
  - Do not read or edit files inside `.kb` directly; use the selected Kibi interface instead.
71
75
  - Kibi authors tracked files but never Git-stages or commits them; ordinary Git workflows remain responsible for review and commit.
@@ -2,7 +2,7 @@
2
2
  id: kibi-traceability
3
3
  name: kibi-traceability
4
4
  description: Maintain source-first requirement, scenario, test, symbol, and proof traceability through Kibi's peer interfaces.
5
- version: 2.0.0
5
+ version: 2.2.0
6
6
  kibiCompatibility: ">=1.0.0"
7
7
  tags:
8
8
  - kibi
@@ -64,3 +64,13 @@ stale snapshots, unavailable receipts, and incomplete grounding explicit.
64
64
  Fresh proof requires a current verification snapshot, the exact contracted E2E
65
65
  command, an append-only receipt, and current symbol coordinates. Structural
66
66
  coverage and a green check are not proof by themselves.
67
+
68
+ Report each requirement's `evidenceLevel` from `kb_coverage` as it is:
69
+ `proved` only when certificate proofs (exhaustive, typecheck, arithmetic,
70
+ smt) derive every applicable claim, named in each contract's `proves`
71
+ (`claimSummary` and `unprovedClaims` say which are missing), `tested` for fresh passing E2E receipts,
72
+ `asserted` when only a person stands behind it, `unverified` otherwise. Its
73
+ `evidenceFloor` says what `kb_check`'s `evidence-floor` rule requires:
74
+ `below` is a traceability gap to close with links, tests and `kibi prove`;
75
+ `pending_reproof` means the receipts are older than the code and need
76
+ `kibi prove`. Never lower `required_evidence` to clear either.
@@ -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.24.0
5
+ version: 2.27.0
6
6
  kibiCompatibility: ">=1.0.0"
7
7
  tags:
8
8
  - kibi
@@ -434,9 +434,11 @@ safe normative claims; use `observation` or `meta` for bug/workaround notes and
434
434
  tests, symbol ownership, and fresh proof-bearing receipts before claiming proof.
435
435
  For an existing product KB that needs semantic backfill, read
436
436
  `resources/kb-improvement.md`, and `resources/proof.md` for the proof workflow.
437
- When a proof ratchet fails, follow Debugging proof regressions in
438
- `resources/proof.md`: use `kibi proof explain` and compare current proof state
439
- to committed `proof/baseline.json` with `kibi proof impact`.
437
+ Each current requirement has an evidence floor (`required_evidence`, else
438
+ `tested` when firm); certificate proof kinds (exhaustive, typecheck,
439
+ arithmetic, smt) reach `proved` for the claims their contract names in
440
+ `proves`, and a requirement is proved only when every claim is. When the `evidence-floor` rule fails, follow Debugging
441
+ proof regressions in `resources/proof.md` and use `kibi proof explain`.
440
442
 
441
443
  ## Predicate Ontology Decision Tree
442
444
 
@@ -17,12 +17,18 @@ reports what happened as `kibi.proof-run.v1`; Kibi evaluates proof.
17
17
  ```bash
18
18
  kibi prove --test TEST-<id>
19
19
  # or: kibi prove --requirement REQ-<id> | --integration <id> | --all
20
+ # add --stale to rerun only tests without a current passing receipt
21
+ # add --resume to continue an interrupted run (same selector)
20
22
  ```
21
23
 
24
+ With `--test`, `--requirement` or `--stale`, a direct `playwright test`
25
+ integration runs only the selected tests' `proof_bindings[].source_file`
26
+ specs; wrappers get them as `KIBI_PROOF_SOURCE_FILES`.
27
+
22
28
  `kibi prove` captures the workspace snapshot, runs each integration's
23
29
  producer once (`shell: false`), revalidates the snapshot, evaluates the
24
30
  artifact against every selected contract, and appends idempotent
25
- `kibi.proof-receipt.v1` receipts.
31
+ `kibi.proof-receipt.v2` receipts (v1 receipts stay valid).
26
32
  3. Confirm with `kb_status` (fresh, current snapshot) and `kb_coverage`.
27
33
 
28
34
  Never hand-write receipts. Kibi derives them from validated
@@ -51,6 +57,13 @@ proof_bindings: # optional provenance metadata
51
57
 
52
58
  Provenance lives in `proof_bindings`; the contract stays semantic.
53
59
 
60
+ `success_policy: own_results_first_attempt` judges each obligation by its own
61
+ `native_case` result when the run failed only in execution (other cases
62
+ failed), so one unrelated failing case does not fail every receipt of a
63
+ Playwright suite. Aggregate-run obligations, run-level errors, timeouts,
64
+ interruptions and setup failures still refuse every obligation. Keep
65
+ `all_required_first_attempt` unless the user wants per-case judgement.
66
+
54
67
  - Every `required_proofs[].symbol_id` must name an existing `symbol` entity,
55
68
  or `kb_check` reports `proof-contract-symbols`. Create the symbols first
56
69
  (`kb_upsert`, narrow method-level granularity, never a `type-shape`
@@ -85,7 +98,10 @@ replacing one named integration.
85
98
  `--command` the proposal is the `package.json` `test` script or the
86
99
  detected runner again), or make the run attributable per test: have the
87
100
  command write a `kibi.proof-test-report.v1` to the path in
88
- `KIBI_PROOF_TEST_REPORT` so each test is judged by its own steps.
101
+ `KIBI_PROOF_TEST_REPORT` so each test is judged by its own steps. The
102
+ shipped `kibi proof run-steps` does that from `proof/steps.json`
103
+ (`[{test_id, steps: [[argv...]]}]`); use it as the integration command
104
+ instead of writing a producer script.
89
105
  - `producer: playwright` (or custom) — the child emits `kibi.proof-run.v1`
90
106
  itself (bundled reporter: `kibi-cli/playwright-reporter`).
91
107
  - `producer: junit` / `tap` — Kibi converts the native report at `artifact`
@@ -126,8 +142,11 @@ Every requirement row also carries `evidenceLevel`, the strength of what backs
126
142
  it, and `evidence`, the entries that earned it (each with `kind`, `scope` and
127
143
  `level`):
128
144
 
129
- - `proved`: a re-checkable certificate covers every case. No proof kind issues
130
- certificates yet, so nothing reaches it today.
145
+ - `proved`: the requirement is `tested` and every applicable claim has a
146
+ derived, code-scope binding from a fresh certificate that still re-checks
147
+ (see Certificate proof kinds). The entry has `kind: certificate` and lists
148
+ the tests. `claimSummary` counts claims per level and `unprovedClaims`
149
+ lists the claims below proved.
131
150
  - `tested`: `proofStatus` is `tested`; fresh E2E receipts cover every linked
132
151
  scenario.
133
152
  - `asserted`: a person stands behind the statement (approved, or firm by
@@ -138,6 +157,94 @@ Report the level as it is. Never call an `asserted` or `unverified`
138
157
  requirement proven or tested, and never call `tested` proved. Firmness is a
139
158
  separate axis: it says how sure the person is, not how strong the evidence is.
140
159
 
160
+ ## Certificate proof kinds
161
+
162
+ A contract's `kind` says what its evidence can reach. The runner kinds `e2e`
163
+ (the default), `example` and `property` support `tested`. The certificate
164
+ kinds support `proved`, and only when Kibi re-checks the certificate the test
165
+ left:
166
+
167
+ - `exhaustive`: the test runs a check on every member of a finite domain.
168
+ Set `domain_source: { symbol_id: SYM-<domain> }` to the symbol that defines
169
+ the domain (add `export: <name>` when the export is not named like the
170
+ symbol's title), and import that symbol in the proof file. Kibi loads the
171
+ export itself (bun, the workspace's tsx, or node; for a `.py` domain
172
+ `KIBI_PYTHON`, the active or project `.venv`/`venv`, then `python3`:
173
+ Enum values, dict keys, list/tuple/set items) and rejects a
174
+ certificate that does not cover exactly its members, so a hand-listed or
175
+ partial domain stays `tested`. An import from build output is mapped back
176
+ to its source through `tsconfig.json` `outDir`/`rootDir`.
177
+ - `typecheck`: a witness file that stops compiling when a domain member
178
+ goes unhandled (a switch ending in a `never` assignment, or a
179
+ `satisfies Record<Domain, ...>` map). Set `witness.path` and
180
+ `domain_source`; the witness must import the domain. Kibi compiles the
181
+ witness itself (strict, with the workspace's TypeScript), so `typescript`
182
+ must be installed in the workspace.
183
+ - `arithmetic`: a claim on one `int` or `real` variable decided exactly from
184
+ typed facts. Set `constraint_source: { fact_ids: [FACT-...] }` to the
185
+ numeric `property_value` facts (one subject and property); the
186
+ certificate's variable is their `property_key` and its assumptions are
187
+ exactly their constraints. To read the value from the code instead, set
188
+ `value_source: [{ symbol_id: SYM-<constant>, export: <name> }]`; Kibi
189
+ evaluates the number export itself and adds `variable eq value` as an
190
+ assumption.
191
+ - `smt`: an SMT-LIB query that declares the facts' property as a constant,
192
+ asserts each `constraint_source` fact constraint and then the claim's
193
+ negation. Kibi re-runs z3 or cvc5 on it and accepts only `unsat`.
194
+
195
+ `arithmetic` and `smt` from `constraint_source` alone prove that the
196
+ knowledge base's facts entail the claim, not that code follows the facts:
197
+ their claim bindings have scope `intent` and the claim stays `tested`. Use
198
+ `value_source` (its symbols `covered_by` the test) for scope `code`. A test
199
+ whose numbers are not in typed facts or code constants stays `tested`.
200
+
201
+ Every certificate contract names the claims it proves in `proves:
202
+ [CLAIM-...]` (blocking `proof-contract-claims` from schema 12). Kibi derives
203
+ each claim's obligation from its grounding fact: a set fact (`value_type:
204
+ set`, `value_set: [...]`) needs the `exhaustive` domain or the `typecheck`
205
+ domain type to be exactly the set; a numeric fact needs the `arithmetic`
206
+ claim or the negated `smt` assertion to be its constraint. The receipt
207
+ records one binding per claim: `derived` (checked, the only kind that
208
+ proves), `attested` (the fact has no derivation; counts as tested) or
209
+ `rejected` with the reason. Model an enumerated claim as a set fact and a
210
+ bound as a numeric fact before writing its certificate. `kibi proof explain
211
+ REQ-...` shows each claim with its bindings.
212
+
213
+ Build the certificate with `kibi-cli/proof-certificates`
214
+ (`exhaustiveCertificate`, `typecheckCertificate`, `arithmeticCertificate`,
215
+ `smtCertificate`), fail the test when it records a failure
216
+ (`failedMembers`), and call `writeCodeCertificate`; it writes to the
217
+ directory `kibi prove` sets in `KIBI_PROOF_CERTIFICATES` and does nothing
218
+ elsewhere. A Python test writes the same `kibi.code-certificate.v1` JSON
219
+ to that directory itself. Wire the KB: the proof file symbol is
220
+ `executable_for` the test and named in `required_proofs`; the domain symbol
221
+ `implements` the requirement and is `covered_by` the test; the test
222
+ `validates` one of the requirement's scenarios. `proved` is per claim: a
223
+ multi-claim requirement is proved only when certificates derive every
224
+ applicable claim, and reads `tested` with `n/m claims proved` otherwise. A
225
+ rejected certificate leaves the receipt at `tested` with
226
+ `certificate_rejection` naming why; fix the proof, never the receipt. If a
227
+ stored certificate stops re-checking later, coverage and `kibi proof
228
+ explain` list it under `certificateRejections`. Use a
229
+ certificate kind only when the domain or claim is genuinely finite or
230
+ decidable; an e2e test that samples cases stays `tested`.
231
+
232
+ ## Evidence floors
233
+
234
+ Each current requirement accepts a weakest level, its floor: the
235
+ `required_evidence` field (`proved`, `tested`, `asserted` or `unverified`),
236
+ or, when absent, `tested` for a firm requirement and no floor otherwise.
237
+ `kb_check`'s `evidence-floor` rule fails while the level is below the floor;
238
+ coverage rows show it as `evidenceFloor` (`required`, `source`, `status`).
239
+ A requirement whose receipts are only older than the code is
240
+ `pending_reproof` and passes a plain check; `kibi check --fresh-evidence`
241
+ fails it, and is what CI runs after `kibi prove`.
242
+
243
+ Fix a finding by raising the level: add the scenario, the end-to-end
244
+ test with a proof contract and the receipts, or have a person approve the
245
+ requirement. Lower `required_evidence` only when a person decides the
246
+ requirement does not need that evidence, and say why in the requirement.
247
+
141
248
  ## Knowledge-base certificates
142
249
 
143
250
  `kb_check` (`kibi check`) proves facts about the KB itself in its
@@ -182,19 +289,22 @@ feasibility are not certified yet; their own rules still decide them.
182
289
 
183
290
  ## After code changes
184
291
 
185
- Receipts bind to the snapshot, contract hash, and execution fingerprint at
186
- run time. Any code or source change moves the snapshot and stales receipts:
187
- re-run `kibi prove` for the affected selection, then confirm `kb_status` and
188
- `kb_coverage` before handoff.
292
+ Receipts bind to the contract, the test document (its links excluded) and
293
+ the code of the symbols they cover. A change to that code stales them:
294
+ re-run `kibi prove --stale` (or the affected selection), then confirm
295
+ `kb_status` and `kb_coverage` before handoff. Type-shape symbols covered by a
296
+ unit test count only while that unit test has a current passing receipt, so
297
+ prove unit tests that cover type-shape symbols too.
189
298
 
190
299
  Full reference: `docs/proving-requirements.md`.
191
300
 
192
301
  ## Debugging proof regressions
193
302
 
194
- When a proof ratchet fails, diagnose first. Do not treat
195
- `proof/baseline.json` as the thing to edit.
303
+ When the `evidence-floor` rule fails, diagnose first. Do not lower
304
+ `required_evidence` to make it pass.
196
305
 
197
- 1. Do not refresh `proof/baseline.json` as the first fix.
306
+ 1. Read the finding: it names the requirement, its level, its floor and where
307
+ the floor comes from (`explicit` or `firmness`).
198
308
  2. Identify the exact requirement and symbol responsible for the regression.
199
309
  3. Use Kibi proof diagnostics rather than reverse-engineering
200
310
  `requirement_proof.pl`:
@@ -202,14 +312,9 @@ When a proof ratchet fails, diagnose first. Do not treat
202
312
  ```bash
203
313
  kibi proof explain REQ-<id>
204
314
  kibi proof explain SYM-<id>
205
- kibi proof impact
315
+ kibi check --rules evidence-floor
206
316
  ```
207
317
 
208
- `kibi proof impact` compares the current Proof projection to
209
- `HEAD:proof/baseline.json` (the committed ratchet snapshot, not the
210
- working-tree file). It is diagnostic: fingerprint differences are reported
211
- and the command exits 0 on successful evaluation. The strict ratchet remains
212
- `scripts/check-proof-baseline.mjs`.
213
318
  4. For `missing_production_symbol_coverage`, inspect symbol role, owning
214
319
  requirement, `covered_by`, candidate test scope, the requirement scenario
215
320
  chain, and the current proof receipt. `kibi proof explain` prints those as
@@ -231,5 +336,5 @@ When a proof ratchet fails, diagnose first. Do not treat
231
336
  `covered_by` relationship semantically correct.
232
337
  10. Prefer one meaningful E2E scenario covering multiple internal functions
233
338
  plus focused unit tests for edge cases, rather than an E2E test per helper.
234
- 11. Refresh the baseline only after a genuine intentional proof-state
235
- improvement requires the ratchet snapshot to be updated.
339
+ 11. A `pending_reproof` finding under `--fresh-evidence` needs `kibi prove`
340
+ for the tests behind the requirement, not a KB change.
@@ -116,7 +116,7 @@ The canonical workflow for any KB operation follows this pattern:
116
116
  7. **Create endpoints**: validated `kb_upsert` for new entities, sequentially
117
117
  8. **Link**: validated `kb_upsert` with `requires_rule`, `requires_predicate`, `constrains`, or `requires_property`, sequentially
118
118
  9. **Validate coverage and consistency**: targeted `rule-safety`, `rule-verifiability`, `semantic-completeness`, `logic-coverage`, `predicate-verifiability`, and `domain-contradictions`, then final full `kb_check`
119
- 10. **Prove execution**: read `kb_status.proofSnapshot`, run `kibi prove` so each configured integration executes once and its `kibi.proof-run.v1` artifact is evaluated against every selected test's `kibi.proof-contract.v1` obligations, appending idempotent `kibi.proof-receipt.v1` receipts; then re-run `kb_coverage`. Never promote durable test status into fresh evidence.
119
+ 10. **Prove execution**: read `kb_status.proofSnapshot`, run `kibi prove` so each configured integration executes once and its `kibi.proof-run.v1` artifact is evaluated against every selected test's `kibi.proof-contract.v1` obligations, appending idempotent `kibi.proof-receipt.v2` receipts; then re-run `kb_coverage` and read each requirement's `evidenceLevel` and `evidenceFloor`. Never promote durable test status into fresh evidence.
120
120
  11. **Repair incrementally**: require `kb_coverage.repairPlan.scope.complete`, apply only one `ready` dependency batch per requirement, validate before every sequential write, and rerun coverage before selecting the next batch
121
121
  12. **Gate workflow evidence**: when `.kb/usage.log` exists, run `kibi usage-metrics --format json --require-acceptance`; repair ranked telemetry diagnostics and never treat stale or insufficient evidence as a pass
122
122
 
@@ -144,7 +144,7 @@ choose package managers, ground semantic claims, resolve contradictions, rerun
144
144
  E2E tests, rewrite receipt history, remap authored symbols, or accept
145
145
  limitations. Those actions remain explicit review/operator/execution steps.
146
146
 
147
- For `e2e_receipt_freshness_low`, query each listed requirement/test gap and run `kibi prove --requirement <id>` (or the covering integration); this appends proof receipts idempotently and preserves history. If `coverage_depth_review` conflicts with a coverage row whose `proofStages.passingE2e.status` is `passed`, report the diagnostic as a stale heuristic and keep any independent proof gaps unresolved.
147
+ For `e2e_receipt_freshness_low`, query each listed requirement/test gap and run `kibi prove --requirement <id>` (or the covering integration); this appends proof receipts idempotently and preserves history. If `coverage_depth_review` conflicts with a coverage row whose `proofStages.passingE2e.status` is `passed`, report the diagnostic as a stale heuristic and keep any independent proof gaps unresolved. For `coarse_anchor_only_review`, the requirement is implemented only by whole-file anchors: link the functions, methods or types that implement it (with `covered_by` to their tests) so its `tested` evidence is tied to that code.
148
148
 
149
149
  ## Creating a New Feature
150
150
  ```
@@ -172,8 +172,8 @@ Do not create a test-fact pair. Facts describe invariants; requirements or scena
172
172
 
173
173
  1. Confirm the exact `REQ -> SCEN -> TEST` path and require typed `verification_scope: end_to_end`; direct requirement-to-test links do not satisfy the conservative scenario stage.
174
174
  2. Read `kb_status` and retain its available `proofSnapshot`. Stop if the runtime reports `unknown`; proof must fail closed when the code identity cannot be computed.
175
- 3. Run the exact E2E command against that snapshot. Record runner, command, start/finish timestamps, outcome, an environment SHA-256, and an artifact/output SHA-256. Do not mint a passed receipt from an authored test status or from an unexecuted assertion.
176
- 4. Preserve every existing receipt byte-for-byte and append the derived `kibi.proof-receipt.v1` object with strictly later `finished_at`. Earlier receipts may bind older contracts or fingerprints; they remain audit history but cannot prove the current contract. Mutation and incremental sync reject history removal, rewriting, and reordering.
175
+ 3. Run `kibi prove --test TEST-<id>` (or `--requirement`, `--integration`, `--all`). It runs the configured producer once against that snapshot and appends a `kibi.proof-receipt.v2` receipt per evaluated contract. Never hand-write a receipt, and never mint a passed receipt from an authored test status or from an unexecuted assertion.
176
+ 4. Receipts are append-only. Earlier receipts, including `kibi.proof-receipt.v1` ones, may bind older contracts or fingerprints; they remain audit history but cannot prove the current contract. Mutation and incremental sync reject history removal, rewriting, and reordering.
177
177
  5. Re-read `kb_status`; if the snapshot changed during the run, discard the candidate as proof and rerun against the new snapshot. Then run `kb_coverage` and inspect `proofStages.passingE2e.receiptEvidence` plus gap codes.
178
178
 
179
179
  Only the newest receipt matching the live snapshot, current contract hash, and current execution fingerprint qualifies, and it must be passed, no more than seven days old, and no more than five minutes in the future. Wrong-snapshot and older-contract history is retained but cannot prove the current test. `missing_proof_receipt`, `stale_proof_receipt`, `failed_proof_receipt`, `invalid_proof_receipt`, `proof_contract_mismatch`, and `proof_snapshot_unavailable` are repair states, not warnings to waive.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kibi-cursor",
3
3
  "displayName": "Kibi",
4
- "version": "2.9.1",
4
+ "version": "2.9.3",
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": {