kibi-cursor 2.6.6 → 2.6.8
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 +28 -0
- package/agent-plugin/plugin.json +1 -1
- package/agent-plugin/skills/kibi-bootstrap/SKILL.md +2 -1
- package/agent-plugin/skills/kibi-usage/SKILL.md +21 -7
- package/agent-plugin/skills/kibi-usage/resources/fact-lanes.md +3 -3
- package/agent-plugin/skills/kibi-usage/resources/proof.md +34 -4
- package/dist/.cursor-plugin/plugin.json +1 -1
- package/dist/skills/.canon-hash.json +4 -4
- package/dist/skills/kibi-bootstrap/SKILL.md +2 -1
- package/dist/skills/kibi-usage/SKILL.md +21 -7
- package/dist/skills/kibi-usage/resources/fact-lanes.md +3 -3
- package/dist/skills/kibi-usage/resources/proof.md +34 -4
- package/package.json +1 -1
- package/skills/.canon-hash.json +4 -4
- package/skills/kibi-bootstrap/SKILL.md +2 -1
- package/skills/kibi-usage/SKILL.md +21 -7
- package/skills/kibi-usage/resources/fact-lanes.md +3 -3
- package/skills/kibi-usage/resources/proof.md +34 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-cursor",
|
|
3
3
|
"displayName": "Kibi",
|
|
4
|
-
"version": "2.6.
|
|
4
|
+
"version": "2.6.8",
|
|
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,33 @@
|
|
|
1
1
|
# kibi-cursor
|
|
2
2
|
|
|
3
|
+
## 2.6.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 95d4a9e: A migration plan that `kb_apply_plan` refuses no longer looks like a success. Re-applying a proof-integration plan whose `.kb/proof/integrations.json` already exists (or one whose runner config changed since planning) used to return `status: "success"` with `outcome: "reconciliation_required"`, so an agent reading only the status thought it had worked. It now returns an error result (`status: "error"`, MCP `isError: true`, CLI exit code 1) with code `MIGRATION_PLAN_REFUSED`, `data.outcome: "refused"` and the refusal reason in the message; nothing was changed and nothing needs reconciling.
|
|
8
|
+
|
|
9
|
+
Technical summary: `kibi.migration-apply-result.v1` gains `outcome: "refused"` (with `closeout.taskOutcome: "blocked"`) for an application that applied no action and whose every failure was a `MigrationActionRefusedError`: the proof-integration executor's refusals, predicate-schema-alignment drift and malformed invocations, and an action code with no automatic executor. `reconciliation_required` keeps meaning an action failed without being refused. `toKibiResult` turns a refused migration result into an error envelope with effects `not_applicable`; the CLI JSON route now exits 1 for any error envelope it returns (also a rejected bootstrap plan), and the MCP tool wrapper sets `isError: true` for one. `docs/mcp-reference.md` documents each migration outcome and how `kb_delete` reports an authored-entity refusal (status success, `deleted: 0`, the reason in `errors`); `docs/error-reference.md` adds `MIGRATION_PLAN_REFUSED`; kibi-usage describes both.
|
|
10
|
+
|
|
11
|
+
- 2e54379: `kb_model` (`mode: "predicates"`) now recognises everyday permission statements. "Suspended users must not publish articles." — the kibi-usage skill's own deny example — returns an applicable `permission_rule` candidate instead of an ontology-gap observation, and so do claims such as "Only editors may approve drafts.". Subject and actor keys derived from plurals are spelled correctly: "coaches" becomes `coach` (not `coache`), "policies" becomes `policy`, and singular words such as "access" or "analysis" keep their final "s".
|
|
12
|
+
|
|
13
|
+
Technical summary: the `permission_rule` applicability gate keeps its action-cue list and also accepts a common action verb (publish, approve, assign, view, edit, create, submit, share, complete and similar) when it directly follows the permission modal (`may`, `can`, `cannot`, `must not`, `is allowed to`, …), so a quota such as "Uploads must not exceed 10 MB." still does not read as a permission. Both `singularize` helpers (predicate modeling and the semantic advisor) now share `singularizeToken`: `-ches`/`-shes`/`-sses`/`-xes` drop "es", `-ies` becomes "y", and tokens ending in "ss", "us" or "is" are kept; each helper keeps its existing exceptions. kibi-usage 2.13.0 shows the four-argument `permission_rule(suspended_user,publish,articles,deny)` fact that `kb_model` plans for the fact-lanes deny example.
|
|
14
|
+
|
|
15
|
+
- f4cc71c: Agents setting up proof now learn up front that a `command` integration is judged as one run: when `kibi proof inspect` proposes the package's whole `test` script, `integrationPlanReason` (also printed in the human output now) says that any failing test in the run fails every proof obligation that names the integration, and how to narrow it. The new `kibi proof inspect --command "<command>"` option proposes that command instead of the detected one, so `kibi proof inspect --update <id> --command "…" --json` can narrow an existing integration to the proof-bearing tests. The kibi-usage proof resource also states that every `required_proofs[].symbol_id` must name an existing symbol entity (create it first) and that `proof_bindings[].source_file` must match that symbol's `sourceFile`.
|
|
16
|
+
|
|
17
|
+
Technical summary: `proposeProofIntegration` and `buildProofIntegrationPlan` accept an explicit argv (`--command`, parsed as space-separated words or a JSON array of strings) ahead of the `package.json` test script and the detected runner; a plan built from the package test script appends the whole-run note to its reason. kibi-usage 2.13.0 `resources/proof.md`, `docs/cli-reference.md` and `docs/proving-requirements.md` document the option and the whole-run semantics (the latter no longer suggests an update plan can switch to a native producer).
|
|
18
|
+
|
|
19
|
+
## 2.6.7
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- c841267: `kb_model` `mode: "predicates"` now treats an explicit `subjectHint` as the planned subject when the requirement is not written yet or constrains nothing: the candidate gets that `subject_key`, `subject_pairing` is computed against it, and the planned predicate fact carries it, so after the requirement is written with `constrains` to that subject fact `kb_check` no longer reports `strict-req-fact-pairing` (previously the plan fell back to the `requirement.subject` placeholder). A `kb_model` parameter that belongs to another mode is no longer silently ignored: the result's `warnings` name it and the parameter to use instead (for example `subjectKey` in mode `predicates` points to `subjectHint`). The kibi-usage skill (2.12.0) updates the "new strict requirement with a predicate grounding" recipe: pass `subjectHint` with the subject fact's key, and send `specified_by` (requirement → scenario) in the requirement's write, not the scenario's.
|
|
24
|
+
|
|
25
|
+
Technical summary: `buildSuggestion` (`predicate-applyplan.ts`) computes `subject_key`/`subject_pairing` against `plannedSubjects` (the constrained subjects, else `[subjectHint]` when explicit, else none). `dispatchComposite` calls the new `foreignParameterWarnings`, which lists input keys another route of the composite declares but the chosen route does not, with per-operation equivalents (`subjectKey` ↔ `subjectHint`); they are appended to the routed payload's own `warnings` (strings, or `{ kind: "parameter_ignored", message, nextAction }` for `kb_model_requirement`) and to the text content. Skill mirrors regenerated.
|
|
26
|
+
|
|
27
|
+
- e0fdbbd: Agents can now configure proof without hand-writing `.kb/proof/integrations.json`. `kibi proof inspect --json` proposes a command integration for the detected test runner and returns a reviewed, hash-bound plan that `kb_apply_plan` (or `kibi apply-plan`) applies; `kibi prove` then runs it. Proof errors no longer point at a bootstrap step that never wrote the file.
|
|
28
|
+
|
|
29
|
+
`kibi proof inspect` adds `proposedIntegration`, `contractDefaults`, `integrationPlan` (`kibi.migration-plan.v2` with one `proof_integration_configure` action) and `integrationPlanReason`, and a new `--update <id>` option plans adding or replacing one named integration. The migration applier gains a `proof_integration_configure` executor: it refuses a create once the file exists, refuses an update when the file's hash changed, refuses either when `package.json`, a lockfile or a runner config changed since planning, and validates the result against `kibi.proof-integration.v1` before an atomic write. The `No proof integration configuration` and `integration … is not configured` messages, the `kibi-usage` proof resource and the `kibi-bootstrap` skill (3.11.0, new step 11 proof-integration item) name this route.
|
|
30
|
+
|
|
3
31
|
## 2.6.6
|
|
4
32
|
|
|
5
33
|
### 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.6.
|
|
4
|
+
"version": "2.6.8",
|
|
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.
|
|
5
|
+
version: 3.11.0
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -46,6 +46,7 @@ Seed branch-local Kibi knowledge from cited product intent, without creating a p
|
|
|
46
46
|
- **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.
|
|
47
47
|
- **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.
|
|
48
48
|
- **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`.
|
|
49
|
+
- **Proof integration.** Run `kibi proof inspect --json`. When it returns an `integrationPlan` (a `command` integration for the detected test runner), show the human the proposed command and `contractDefaults`, and on approval apply that exact plan with `kb_apply_plan` (`plan`, `approvedPlanHash` = its `planHash`, `approvedActionIds`); it writes `.kb/proof/integrations.json`, which you never hand-write. With no runner detected, report that proof stays deferred. Proof-bearing tests then name the integration in `proof_contract.integration`, and `kibi prove` records their evidence.
|
|
49
50
|
Finish with `kb_check` and `kb_status`.
|
|
50
51
|
12. **Report** calls made, result statuses, applied scope, what step 11 authored, gaps, and follow-ups. Classify as complete, partial, awaiting approval, or blocked.
|
|
51
52
|
|
|
@@ -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.13.0
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -148,7 +148,13 @@ error `BOOTSTRAP_PLAN_REJECTED` can follow earlier committed actions: inspect
|
|
|
148
148
|
`data.actionResults` and `data.applied`, then re-plan from the current state.
|
|
149
149
|
Its journal is terminal; never recover or replay it. `BOOTSTRAP_PLAN_INVALID`
|
|
150
150
|
fails preflight before bootstrap writes or a new journal; obtain a corrected
|
|
151
|
-
plan.
|
|
151
|
+
plan. A migration plan whose actions were refused before changing anything
|
|
152
|
+
returns `status: error`, `MIGRATION_PLAN_REFUSED` and `data.outcome:
|
|
153
|
+
refused`: nothing changed, so read the action `detail` and get a new plan.
|
|
154
|
+
`data.outcome: reconciliation_required` (status success) means an action
|
|
155
|
+
failed mid-way: inspect its effect before retrying. `kb_delete` of an
|
|
156
|
+
authored entity returns status success with `deleted: 0`; its `errors` say
|
|
157
|
+
why nothing was deleted. If the status is
|
|
152
158
|
`committed_with_repairs`, the mutation already committed: inspect failed effects,
|
|
153
159
|
execute each required repair action in order, and never retry the original
|
|
154
160
|
operation. Record effect failures, followed actions, and unsafe retries in
|
|
@@ -219,11 +225,19 @@ authored. Each one is the order the write path accepts.
|
|
|
219
225
|
`semantic_inventory_version`, `semantic_source_field` and
|
|
220
226
|
`semantic_source_hash`, the prose into `semantic_text`, `propositions`
|
|
221
227
|
into `semantic_inventory` and the assertive `claim_key`s into
|
|
222
|
-
`logic_claims`.
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
228
|
+
`logic_claims`. Reuse (or `kb_upsert`) the subject fact, then call
|
|
229
|
+
`kb_model` mode `predicates` per clause with `subjectHint` set to that
|
|
230
|
+
subject fact's `subject_key`: the requirement constrains nothing yet, so
|
|
231
|
+
the hint is the planned subject and the planned fact gets its
|
|
232
|
+
`subject_key` (`subjectKey` is a mode `requirement` parameter; mode
|
|
233
|
+
`predicates` ignores it and warns). `kb_upsert` the returned `applyPlan`
|
|
234
|
+
fact first (it carries the clause's `claim_key`). Then write the
|
|
235
|
+
requirement in one `kb_upsert` with the ledger (that clause `status:
|
|
236
|
+
modeled`), a sectioned `document.body`, `constrains` to the subject
|
|
237
|
+
fact, `requires_predicate` to `relationshipTarget` and `specified_by` to
|
|
238
|
+
its scenario: `specified_by` (req → scenario) is sent in the
|
|
239
|
+
requirement's write, never in the scenario's, so create the scenario
|
|
240
|
+
first. A
|
|
227
241
|
`modeled` entry and its grounding link must arrive in the same write
|
|
228
242
|
(`modeled semantic_inventory entries (n) must equal logical grounding
|
|
229
243
|
relationships (m)`); a clause not grounded yet stays `status: missing`
|
|
@@ -61,16 +61,16 @@ A schema can close an argument with `argument_constants` (allowed values keyed b
|
|
|
61
61
|
|
|
62
62
|
### Deny predicate
|
|
63
63
|
|
|
64
|
-
Claim: “Suspended users must not publish articles.” When `permission_rule` fits, preserve its positive schema name and encode prohibition as polarity:
|
|
64
|
+
Claim: “Suspended users must not publish articles.” When `permission_rule` fits, preserve its positive schema name and encode prohibition as polarity. `kb_model` (`mode: "predicates"`) plans this fact for the claim; the built-in schema's fourth argument, `decision`, repeats the polarity:
|
|
65
65
|
|
|
66
66
|
```yaml
|
|
67
67
|
id: FACT-SUSPENDED-PUBLISH-DENIED
|
|
68
68
|
status: active
|
|
69
69
|
fact_kind: predicate
|
|
70
70
|
predicate_name: permission_rule
|
|
71
|
-
predicate_args: [suspended_user, publish,
|
|
71
|
+
predicate_args: [suspended_user, publish, articles, deny]
|
|
72
72
|
polarity: deny
|
|
73
|
-
canonical_key: permission_rule(suspended_user,publish,
|
|
73
|
+
canonical_key: permission_rule(suspended_user,publish,articles,deny)
|
|
74
74
|
claim_key: <advisor-issued key for this exact clause>
|
|
75
75
|
claim_text: Suspended users must not publish articles.
|
|
76
76
|
relationship: { type: requires_predicate, from: REQ-SUSPENDED-PUBLISH-DENIED, to: FACT-SUSPENDED-PUBLISH-DENIED }
|
|
@@ -51,14 +51,41 @@ proof_bindings: # optional provenance metadata
|
|
|
51
51
|
|
|
52
52
|
Provenance lives in `proof_bindings`; the contract stays semantic.
|
|
53
53
|
|
|
54
|
+
- Every `required_proofs[].symbol_id` must name an existing `symbol` entity,
|
|
55
|
+
or `kb_check` reports `proof-contract-symbols`. Create the symbols first
|
|
56
|
+
(`kb_upsert`, narrow method-level granularity, never a `type-shape`
|
|
57
|
+
symbol): a production symbol `implements` the requirement and is
|
|
58
|
+
`covered_by` the test; an executable test symbol is `executable_for` it.
|
|
59
|
+
- `proof_bindings[].source_file`, when set, must equal the named symbol's
|
|
60
|
+
`sourceFile`: for a production symbol that is the production file, not the
|
|
61
|
+
spec file that exercises it. Omit it when unsure.
|
|
62
|
+
|
|
54
63
|
## Integration configuration
|
|
55
64
|
|
|
56
65
|
`.kb/proof/integrations.json` (`kibi.proof-integration.v1`) is tracked,
|
|
57
|
-
Kibi-managed configuration describing evidence production only
|
|
66
|
+
Kibi-managed configuration describing evidence production only. Never
|
|
67
|
+
hand-write it: `kibi proof inspect --json` proposes a `command` integration
|
|
68
|
+
for the detected test runner (the `package.json` `test` script first) and
|
|
69
|
+
returns `integrationPlan`, a hash-bound `kibi.migration-plan.v2`, plus the
|
|
70
|
+
`contractDefaults` a proof-bearing test's `proof_contract` uses. Show the
|
|
71
|
+
proposal to the human, then apply the plan with `kb_apply_plan` (or
|
|
72
|
+
`kibi apply-plan --input -`) passing `plan`, `approvedPlanHash` (the plan's
|
|
73
|
+
`planHash`) and `approvedActionIds`. Once the file exists, a create plan is
|
|
74
|
+
refused (`status: error`, `MIGRATION_PLAN_REFUSED`, `data.outcome: refused`;
|
|
75
|
+
nothing is written); `kibi proof inspect --update <id> --json` plans adding or
|
|
76
|
+
replacing one named integration.
|
|
58
77
|
|
|
59
78
|
- `producer: command` — Kibi synthesizes the envelope from the process
|
|
60
79
|
outcome; obligations are bound with `aggregate_run` provenance and the
|
|
61
|
-
single process invocation counts as the known first attempt.
|
|
80
|
+
single process invocation counts as the known first attempt. The run is
|
|
81
|
+
judged as a whole: any failing test in it fails every obligation of every
|
|
82
|
+
test that names the integration, so a suite with unrelated failures proves
|
|
83
|
+
nothing. Narrow the command to the proof-bearing tests with
|
|
84
|
+
`kibi proof inspect --update <id> --command "<command>" --json` (without
|
|
85
|
+
`--command` the proposal is the `package.json` `test` script or the
|
|
86
|
+
detected runner again), or make the run attributable per test: have the
|
|
87
|
+
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.
|
|
62
89
|
- `producer: playwright` (or custom) — the child emits `kibi.proof-run.v1`
|
|
63
90
|
itself (bundled reporter: `kibi-cli/playwright-reporter`).
|
|
64
91
|
- `producer: junit` / `tap` — Kibi converts the native report at `artifact`
|
|
@@ -82,8 +109,11 @@ effective fingerprint and do.
|
|
|
82
109
|
|
|
83
110
|
## Common rejections
|
|
84
111
|
|
|
85
|
-
- `No proof integration configuration` —
|
|
86
|
-
|
|
112
|
+
- `No proof integration configuration` — proof is not configured for this
|
|
113
|
+
repository yet; run `kibi proof inspect --json`, review its
|
|
114
|
+
`integrationPlan` and apply it with `kb_apply_plan`.
|
|
115
|
+
- `integration '<id>' ... is not configured` — the test names an integration
|
|
116
|
+
the file lacks; plan it with `kibi proof inspect --update <id> --json`.
|
|
87
117
|
- `captured snapshot is not the live workspace snapshot` — the tree changed
|
|
88
118
|
between capture and ingest; re-run `kibi prove`.
|
|
89
119
|
- `artifact command_argv does not match the configured command` — the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-cursor",
|
|
3
3
|
"displayName": "Kibi",
|
|
4
|
-
"version": "2.6.
|
|
4
|
+
"version": "2.6.8",
|
|
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": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"kibi-bootstrap/SKILL.md": "
|
|
2
|
+
"kibi-bootstrap/SKILL.md": "d481921f31c143d20ff7c7c6563804e2f98a893df75ba1656bf9498f2d4bc4b1",
|
|
3
3
|
"kibi-bootstrap/resources/bootstrap.md": "e93fae88a6853d0092cde7eee33f7d4943a8141e3841bfe3f64ab73247867b6a",
|
|
4
4
|
"kibi-bootstrap/resources/branch-lifecycle.md": "c854264ce888439140883a3fc636db5e522f020dd27b30a5c1ecc4105b64ed13",
|
|
5
5
|
"kibi-bootstrap/resources/operation-access.md": "b5a6a59e72d800c376e7fad79132897623c32a0ce152a1e8d73f9628b444db51",
|
|
@@ -13,13 +13,13 @@
|
|
|
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": "6f20aed5ad02f5e09801962143366fca0f3b24ef09c0ef6b72741d5d9d8d078e",
|
|
17
17
|
"kibi-usage/resources/branch-lifecycle.md": "f1bf359e9826e83c548f3cd0287f8175a62456527b0132b06b3f9f74aa59b7d6",
|
|
18
|
-
"kibi-usage/resources/fact-lanes.md": "
|
|
18
|
+
"kibi-usage/resources/fact-lanes.md": "e95c4a729264c81dd45100a4915fdf4f2dead19ce1fa0a0667da90b5e18e06ae",
|
|
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
|
-
"kibi-usage/resources/proof.md": "
|
|
22
|
+
"kibi-usage/resources/proof.md": "ede83e983edfe4ec9cf0e534289cd144408e93e5e0d2430c4779b8d5a313e7d2",
|
|
23
23
|
"kibi-usage/resources/relationship-directions.md": "0fdd67032c2d15299f772845fc4f807eb9435b09507bd87a5911ab33db2f143d",
|
|
24
24
|
"kibi-usage/resources/source-authoring.md": "a29d411fe86e6e29ce364e4ad5925bda40127c4b328a4c657d5b5f0d9fe98ff1",
|
|
25
25
|
"kibi-usage/resources/ui-requirements.md": "47a42dccbabe1e636d6b89e19e21e1ac0704b6d46a577d913e1482435ab7afb8",
|
|
@@ -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.
|
|
5
|
+
version: 3.11.0
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -46,6 +46,7 @@ Seed branch-local Kibi knowledge from cited product intent, without creating a p
|
|
|
46
46
|
- **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.
|
|
47
47
|
- **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.
|
|
48
48
|
- **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`.
|
|
49
|
+
- **Proof integration.** Run `kibi proof inspect --json`. When it returns an `integrationPlan` (a `command` integration for the detected test runner), show the human the proposed command and `contractDefaults`, and on approval apply that exact plan with `kb_apply_plan` (`plan`, `approvedPlanHash` = its `planHash`, `approvedActionIds`); it writes `.kb/proof/integrations.json`, which you never hand-write. With no runner detected, report that proof stays deferred. Proof-bearing tests then name the integration in `proof_contract.integration`, and `kibi prove` records their evidence.
|
|
49
50
|
Finish with `kb_check` and `kb_status`.
|
|
50
51
|
12. **Report** calls made, result statuses, applied scope, what step 11 authored, gaps, and follow-ups. Classify as complete, partial, awaiting approval, or blocked.
|
|
51
52
|
|
|
@@ -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.13.0
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -148,7 +148,13 @@ error `BOOTSTRAP_PLAN_REJECTED` can follow earlier committed actions: inspect
|
|
|
148
148
|
`data.actionResults` and `data.applied`, then re-plan from the current state.
|
|
149
149
|
Its journal is terminal; never recover or replay it. `BOOTSTRAP_PLAN_INVALID`
|
|
150
150
|
fails preflight before bootstrap writes or a new journal; obtain a corrected
|
|
151
|
-
plan.
|
|
151
|
+
plan. A migration plan whose actions were refused before changing anything
|
|
152
|
+
returns `status: error`, `MIGRATION_PLAN_REFUSED` and `data.outcome:
|
|
153
|
+
refused`: nothing changed, so read the action `detail` and get a new plan.
|
|
154
|
+
`data.outcome: reconciliation_required` (status success) means an action
|
|
155
|
+
failed mid-way: inspect its effect before retrying. `kb_delete` of an
|
|
156
|
+
authored entity returns status success with `deleted: 0`; its `errors` say
|
|
157
|
+
why nothing was deleted. If the status is
|
|
152
158
|
`committed_with_repairs`, the mutation already committed: inspect failed effects,
|
|
153
159
|
execute each required repair action in order, and never retry the original
|
|
154
160
|
operation. Record effect failures, followed actions, and unsafe retries in
|
|
@@ -219,11 +225,19 @@ authored. Each one is the order the write path accepts.
|
|
|
219
225
|
`semantic_inventory_version`, `semantic_source_field` and
|
|
220
226
|
`semantic_source_hash`, the prose into `semantic_text`, `propositions`
|
|
221
227
|
into `semantic_inventory` and the assertive `claim_key`s into
|
|
222
|
-
`logic_claims`.
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
228
|
+
`logic_claims`. Reuse (or `kb_upsert`) the subject fact, then call
|
|
229
|
+
`kb_model` mode `predicates` per clause with `subjectHint` set to that
|
|
230
|
+
subject fact's `subject_key`: the requirement constrains nothing yet, so
|
|
231
|
+
the hint is the planned subject and the planned fact gets its
|
|
232
|
+
`subject_key` (`subjectKey` is a mode `requirement` parameter; mode
|
|
233
|
+
`predicates` ignores it and warns). `kb_upsert` the returned `applyPlan`
|
|
234
|
+
fact first (it carries the clause's `claim_key`). Then write the
|
|
235
|
+
requirement in one `kb_upsert` with the ledger (that clause `status:
|
|
236
|
+
modeled`), a sectioned `document.body`, `constrains` to the subject
|
|
237
|
+
fact, `requires_predicate` to `relationshipTarget` and `specified_by` to
|
|
238
|
+
its scenario: `specified_by` (req → scenario) is sent in the
|
|
239
|
+
requirement's write, never in the scenario's, so create the scenario
|
|
240
|
+
first. A
|
|
227
241
|
`modeled` entry and its grounding link must arrive in the same write
|
|
228
242
|
(`modeled semantic_inventory entries (n) must equal logical grounding
|
|
229
243
|
relationships (m)`); a clause not grounded yet stays `status: missing`
|
|
@@ -61,16 +61,16 @@ A schema can close an argument with `argument_constants` (allowed values keyed b
|
|
|
61
61
|
|
|
62
62
|
### Deny predicate
|
|
63
63
|
|
|
64
|
-
Claim: “Suspended users must not publish articles.” When `permission_rule` fits, preserve its positive schema name and encode prohibition as polarity:
|
|
64
|
+
Claim: “Suspended users must not publish articles.” When `permission_rule` fits, preserve its positive schema name and encode prohibition as polarity. `kb_model` (`mode: "predicates"`) plans this fact for the claim; the built-in schema's fourth argument, `decision`, repeats the polarity:
|
|
65
65
|
|
|
66
66
|
```yaml
|
|
67
67
|
id: FACT-SUSPENDED-PUBLISH-DENIED
|
|
68
68
|
status: active
|
|
69
69
|
fact_kind: predicate
|
|
70
70
|
predicate_name: permission_rule
|
|
71
|
-
predicate_args: [suspended_user, publish,
|
|
71
|
+
predicate_args: [suspended_user, publish, articles, deny]
|
|
72
72
|
polarity: deny
|
|
73
|
-
canonical_key: permission_rule(suspended_user,publish,
|
|
73
|
+
canonical_key: permission_rule(suspended_user,publish,articles,deny)
|
|
74
74
|
claim_key: <advisor-issued key for this exact clause>
|
|
75
75
|
claim_text: Suspended users must not publish articles.
|
|
76
76
|
relationship: { type: requires_predicate, from: REQ-SUSPENDED-PUBLISH-DENIED, to: FACT-SUSPENDED-PUBLISH-DENIED }
|
|
@@ -51,14 +51,41 @@ proof_bindings: # optional provenance metadata
|
|
|
51
51
|
|
|
52
52
|
Provenance lives in `proof_bindings`; the contract stays semantic.
|
|
53
53
|
|
|
54
|
+
- Every `required_proofs[].symbol_id` must name an existing `symbol` entity,
|
|
55
|
+
or `kb_check` reports `proof-contract-symbols`. Create the symbols first
|
|
56
|
+
(`kb_upsert`, narrow method-level granularity, never a `type-shape`
|
|
57
|
+
symbol): a production symbol `implements` the requirement and is
|
|
58
|
+
`covered_by` the test; an executable test symbol is `executable_for` it.
|
|
59
|
+
- `proof_bindings[].source_file`, when set, must equal the named symbol's
|
|
60
|
+
`sourceFile`: for a production symbol that is the production file, not the
|
|
61
|
+
spec file that exercises it. Omit it when unsure.
|
|
62
|
+
|
|
54
63
|
## Integration configuration
|
|
55
64
|
|
|
56
65
|
`.kb/proof/integrations.json` (`kibi.proof-integration.v1`) is tracked,
|
|
57
|
-
Kibi-managed configuration describing evidence production only
|
|
66
|
+
Kibi-managed configuration describing evidence production only. Never
|
|
67
|
+
hand-write it: `kibi proof inspect --json` proposes a `command` integration
|
|
68
|
+
for the detected test runner (the `package.json` `test` script first) and
|
|
69
|
+
returns `integrationPlan`, a hash-bound `kibi.migration-plan.v2`, plus the
|
|
70
|
+
`contractDefaults` a proof-bearing test's `proof_contract` uses. Show the
|
|
71
|
+
proposal to the human, then apply the plan with `kb_apply_plan` (or
|
|
72
|
+
`kibi apply-plan --input -`) passing `plan`, `approvedPlanHash` (the plan's
|
|
73
|
+
`planHash`) and `approvedActionIds`. Once the file exists, a create plan is
|
|
74
|
+
refused (`status: error`, `MIGRATION_PLAN_REFUSED`, `data.outcome: refused`;
|
|
75
|
+
nothing is written); `kibi proof inspect --update <id> --json` plans adding or
|
|
76
|
+
replacing one named integration.
|
|
58
77
|
|
|
59
78
|
- `producer: command` — Kibi synthesizes the envelope from the process
|
|
60
79
|
outcome; obligations are bound with `aggregate_run` provenance and the
|
|
61
|
-
single process invocation counts as the known first attempt.
|
|
80
|
+
single process invocation counts as the known first attempt. The run is
|
|
81
|
+
judged as a whole: any failing test in it fails every obligation of every
|
|
82
|
+
test that names the integration, so a suite with unrelated failures proves
|
|
83
|
+
nothing. Narrow the command to the proof-bearing tests with
|
|
84
|
+
`kibi proof inspect --update <id> --command "<command>" --json` (without
|
|
85
|
+
`--command` the proposal is the `package.json` `test` script or the
|
|
86
|
+
detected runner again), or make the run attributable per test: have the
|
|
87
|
+
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.
|
|
62
89
|
- `producer: playwright` (or custom) — the child emits `kibi.proof-run.v1`
|
|
63
90
|
itself (bundled reporter: `kibi-cli/playwright-reporter`).
|
|
64
91
|
- `producer: junit` / `tap` — Kibi converts the native report at `artifact`
|
|
@@ -82,8 +109,11 @@ effective fingerprint and do.
|
|
|
82
109
|
|
|
83
110
|
## Common rejections
|
|
84
111
|
|
|
85
|
-
- `No proof integration configuration` —
|
|
86
|
-
|
|
112
|
+
- `No proof integration configuration` — proof is not configured for this
|
|
113
|
+
repository yet; run `kibi proof inspect --json`, review its
|
|
114
|
+
`integrationPlan` and apply it with `kb_apply_plan`.
|
|
115
|
+
- `integration '<id>' ... is not configured` — the test names an integration
|
|
116
|
+
the file lacks; plan it with `kibi proof inspect --update <id> --json`.
|
|
87
117
|
- `captured snapshot is not the live workspace snapshot` — the tree changed
|
|
88
118
|
between capture and ingest; re-run `kibi prove`.
|
|
89
119
|
- `artifact command_argv does not match the configured command` — the
|
package/package.json
CHANGED
package/skills/.canon-hash.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"kibi-bootstrap/SKILL.md": "
|
|
2
|
+
"kibi-bootstrap/SKILL.md": "d481921f31c143d20ff7c7c6563804e2f98a893df75ba1656bf9498f2d4bc4b1",
|
|
3
3
|
"kibi-bootstrap/resources/bootstrap.md": "e93fae88a6853d0092cde7eee33f7d4943a8141e3841bfe3f64ab73247867b6a",
|
|
4
4
|
"kibi-bootstrap/resources/branch-lifecycle.md": "c854264ce888439140883a3fc636db5e522f020dd27b30a5c1ecc4105b64ed13",
|
|
5
5
|
"kibi-bootstrap/resources/operation-access.md": "b5a6a59e72d800c376e7fad79132897623c32a0ce152a1e8d73f9628b444db51",
|
|
@@ -13,13 +13,13 @@
|
|
|
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": "6f20aed5ad02f5e09801962143366fca0f3b24ef09c0ef6b72741d5d9d8d078e",
|
|
17
17
|
"kibi-usage/resources/branch-lifecycle.md": "f1bf359e9826e83c548f3cd0287f8175a62456527b0132b06b3f9f74aa59b7d6",
|
|
18
|
-
"kibi-usage/resources/fact-lanes.md": "
|
|
18
|
+
"kibi-usage/resources/fact-lanes.md": "e95c4a729264c81dd45100a4915fdf4f2dead19ce1fa0a0667da90b5e18e06ae",
|
|
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
|
-
"kibi-usage/resources/proof.md": "
|
|
22
|
+
"kibi-usage/resources/proof.md": "ede83e983edfe4ec9cf0e534289cd144408e93e5e0d2430c4779b8d5a313e7d2",
|
|
23
23
|
"kibi-usage/resources/relationship-directions.md": "0fdd67032c2d15299f772845fc4f807eb9435b09507bd87a5911ab33db2f143d",
|
|
24
24
|
"kibi-usage/resources/source-authoring.md": "a29d411fe86e6e29ce364e4ad5925bda40127c4b328a4c657d5b5f0d9fe98ff1",
|
|
25
25
|
"kibi-usage/resources/ui-requirements.md": "47a42dccbabe1e636d6b89e19e21e1ac0704b6d46a577d913e1482435ab7afb8",
|
|
@@ -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.
|
|
5
|
+
version: 3.11.0
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -46,6 +46,7 @@ Seed branch-local Kibi knowledge from cited product intent, without creating a p
|
|
|
46
46
|
- **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.
|
|
47
47
|
- **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.
|
|
48
48
|
- **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`.
|
|
49
|
+
- **Proof integration.** Run `kibi proof inspect --json`. When it returns an `integrationPlan` (a `command` integration for the detected test runner), show the human the proposed command and `contractDefaults`, and on approval apply that exact plan with `kb_apply_plan` (`plan`, `approvedPlanHash` = its `planHash`, `approvedActionIds`); it writes `.kb/proof/integrations.json`, which you never hand-write. With no runner detected, report that proof stays deferred. Proof-bearing tests then name the integration in `proof_contract.integration`, and `kibi prove` records their evidence.
|
|
49
50
|
Finish with `kb_check` and `kb_status`.
|
|
50
51
|
12. **Report** calls made, result statuses, applied scope, what step 11 authored, gaps, and follow-ups. Classify as complete, partial, awaiting approval, or blocked.
|
|
51
52
|
|
|
@@ -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.13.0
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -148,7 +148,13 @@ error `BOOTSTRAP_PLAN_REJECTED` can follow earlier committed actions: inspect
|
|
|
148
148
|
`data.actionResults` and `data.applied`, then re-plan from the current state.
|
|
149
149
|
Its journal is terminal; never recover or replay it. `BOOTSTRAP_PLAN_INVALID`
|
|
150
150
|
fails preflight before bootstrap writes or a new journal; obtain a corrected
|
|
151
|
-
plan.
|
|
151
|
+
plan. A migration plan whose actions were refused before changing anything
|
|
152
|
+
returns `status: error`, `MIGRATION_PLAN_REFUSED` and `data.outcome:
|
|
153
|
+
refused`: nothing changed, so read the action `detail` and get a new plan.
|
|
154
|
+
`data.outcome: reconciliation_required` (status success) means an action
|
|
155
|
+
failed mid-way: inspect its effect before retrying. `kb_delete` of an
|
|
156
|
+
authored entity returns status success with `deleted: 0`; its `errors` say
|
|
157
|
+
why nothing was deleted. If the status is
|
|
152
158
|
`committed_with_repairs`, the mutation already committed: inspect failed effects,
|
|
153
159
|
execute each required repair action in order, and never retry the original
|
|
154
160
|
operation. Record effect failures, followed actions, and unsafe retries in
|
|
@@ -219,11 +225,19 @@ authored. Each one is the order the write path accepts.
|
|
|
219
225
|
`semantic_inventory_version`, `semantic_source_field` and
|
|
220
226
|
`semantic_source_hash`, the prose into `semantic_text`, `propositions`
|
|
221
227
|
into `semantic_inventory` and the assertive `claim_key`s into
|
|
222
|
-
`logic_claims`.
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
228
|
+
`logic_claims`. Reuse (or `kb_upsert`) the subject fact, then call
|
|
229
|
+
`kb_model` mode `predicates` per clause with `subjectHint` set to that
|
|
230
|
+
subject fact's `subject_key`: the requirement constrains nothing yet, so
|
|
231
|
+
the hint is the planned subject and the planned fact gets its
|
|
232
|
+
`subject_key` (`subjectKey` is a mode `requirement` parameter; mode
|
|
233
|
+
`predicates` ignores it and warns). `kb_upsert` the returned `applyPlan`
|
|
234
|
+
fact first (it carries the clause's `claim_key`). Then write the
|
|
235
|
+
requirement in one `kb_upsert` with the ledger (that clause `status:
|
|
236
|
+
modeled`), a sectioned `document.body`, `constrains` to the subject
|
|
237
|
+
fact, `requires_predicate` to `relationshipTarget` and `specified_by` to
|
|
238
|
+
its scenario: `specified_by` (req → scenario) is sent in the
|
|
239
|
+
requirement's write, never in the scenario's, so create the scenario
|
|
240
|
+
first. A
|
|
227
241
|
`modeled` entry and its grounding link must arrive in the same write
|
|
228
242
|
(`modeled semantic_inventory entries (n) must equal logical grounding
|
|
229
243
|
relationships (m)`); a clause not grounded yet stays `status: missing`
|
|
@@ -61,16 +61,16 @@ A schema can close an argument with `argument_constants` (allowed values keyed b
|
|
|
61
61
|
|
|
62
62
|
### Deny predicate
|
|
63
63
|
|
|
64
|
-
Claim: “Suspended users must not publish articles.” When `permission_rule` fits, preserve its positive schema name and encode prohibition as polarity:
|
|
64
|
+
Claim: “Suspended users must not publish articles.” When `permission_rule` fits, preserve its positive schema name and encode prohibition as polarity. `kb_model` (`mode: "predicates"`) plans this fact for the claim; the built-in schema's fourth argument, `decision`, repeats the polarity:
|
|
65
65
|
|
|
66
66
|
```yaml
|
|
67
67
|
id: FACT-SUSPENDED-PUBLISH-DENIED
|
|
68
68
|
status: active
|
|
69
69
|
fact_kind: predicate
|
|
70
70
|
predicate_name: permission_rule
|
|
71
|
-
predicate_args: [suspended_user, publish,
|
|
71
|
+
predicate_args: [suspended_user, publish, articles, deny]
|
|
72
72
|
polarity: deny
|
|
73
|
-
canonical_key: permission_rule(suspended_user,publish,
|
|
73
|
+
canonical_key: permission_rule(suspended_user,publish,articles,deny)
|
|
74
74
|
claim_key: <advisor-issued key for this exact clause>
|
|
75
75
|
claim_text: Suspended users must not publish articles.
|
|
76
76
|
relationship: { type: requires_predicate, from: REQ-SUSPENDED-PUBLISH-DENIED, to: FACT-SUSPENDED-PUBLISH-DENIED }
|
|
@@ -51,14 +51,41 @@ proof_bindings: # optional provenance metadata
|
|
|
51
51
|
|
|
52
52
|
Provenance lives in `proof_bindings`; the contract stays semantic.
|
|
53
53
|
|
|
54
|
+
- Every `required_proofs[].symbol_id` must name an existing `symbol` entity,
|
|
55
|
+
or `kb_check` reports `proof-contract-symbols`. Create the symbols first
|
|
56
|
+
(`kb_upsert`, narrow method-level granularity, never a `type-shape`
|
|
57
|
+
symbol): a production symbol `implements` the requirement and is
|
|
58
|
+
`covered_by` the test; an executable test symbol is `executable_for` it.
|
|
59
|
+
- `proof_bindings[].source_file`, when set, must equal the named symbol's
|
|
60
|
+
`sourceFile`: for a production symbol that is the production file, not the
|
|
61
|
+
spec file that exercises it. Omit it when unsure.
|
|
62
|
+
|
|
54
63
|
## Integration configuration
|
|
55
64
|
|
|
56
65
|
`.kb/proof/integrations.json` (`kibi.proof-integration.v1`) is tracked,
|
|
57
|
-
Kibi-managed configuration describing evidence production only
|
|
66
|
+
Kibi-managed configuration describing evidence production only. Never
|
|
67
|
+
hand-write it: `kibi proof inspect --json` proposes a `command` integration
|
|
68
|
+
for the detected test runner (the `package.json` `test` script first) and
|
|
69
|
+
returns `integrationPlan`, a hash-bound `kibi.migration-plan.v2`, plus the
|
|
70
|
+
`contractDefaults` a proof-bearing test's `proof_contract` uses. Show the
|
|
71
|
+
proposal to the human, then apply the plan with `kb_apply_plan` (or
|
|
72
|
+
`kibi apply-plan --input -`) passing `plan`, `approvedPlanHash` (the plan's
|
|
73
|
+
`planHash`) and `approvedActionIds`. Once the file exists, a create plan is
|
|
74
|
+
refused (`status: error`, `MIGRATION_PLAN_REFUSED`, `data.outcome: refused`;
|
|
75
|
+
nothing is written); `kibi proof inspect --update <id> --json` plans adding or
|
|
76
|
+
replacing one named integration.
|
|
58
77
|
|
|
59
78
|
- `producer: command` — Kibi synthesizes the envelope from the process
|
|
60
79
|
outcome; obligations are bound with `aggregate_run` provenance and the
|
|
61
|
-
single process invocation counts as the known first attempt.
|
|
80
|
+
single process invocation counts as the known first attempt. The run is
|
|
81
|
+
judged as a whole: any failing test in it fails every obligation of every
|
|
82
|
+
test that names the integration, so a suite with unrelated failures proves
|
|
83
|
+
nothing. Narrow the command to the proof-bearing tests with
|
|
84
|
+
`kibi proof inspect --update <id> --command "<command>" --json` (without
|
|
85
|
+
`--command` the proposal is the `package.json` `test` script or the
|
|
86
|
+
detected runner again), or make the run attributable per test: have the
|
|
87
|
+
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.
|
|
62
89
|
- `producer: playwright` (or custom) — the child emits `kibi.proof-run.v1`
|
|
63
90
|
itself (bundled reporter: `kibi-cli/playwright-reporter`).
|
|
64
91
|
- `producer: junit` / `tap` — Kibi converts the native report at `artifact`
|
|
@@ -82,8 +109,11 @@ effective fingerprint and do.
|
|
|
82
109
|
|
|
83
110
|
## Common rejections
|
|
84
111
|
|
|
85
|
-
- `No proof integration configuration` —
|
|
86
|
-
|
|
112
|
+
- `No proof integration configuration` — proof is not configured for this
|
|
113
|
+
repository yet; run `kibi proof inspect --json`, review its
|
|
114
|
+
`integrationPlan` and apply it with `kb_apply_plan`.
|
|
115
|
+
- `integration '<id>' ... is not configured` — the test names an integration
|
|
116
|
+
the file lacks; plan it with `kibi proof inspect --update <id> --json`.
|
|
87
117
|
- `captured snapshot is not the live workspace snapshot` — the tree changed
|
|
88
118
|
between capture and ingest; re-run `kibi prove`.
|
|
89
119
|
- `artifact command_argv does not match the configured command` — the
|