kibi-cursor 2.1.1 → 2.3.0
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 +106 -0
- package/README.md +7 -3
- package/agent-plugin/plugin.json +1 -1
- package/agent-plugin/skills/kibi-bootstrap/SKILL.md +52 -11
- package/agent-plugin/skills/kibi-bootstrap/resources/bootstrap.md +12 -1
- package/agent-plugin/skills/kibi-usage/SKILL.md +82 -18
- package/agent-plugin/skills/kibi-usage/resources/fact-lanes.md +5 -5
- package/agent-plugin/skills/kibi-usage/resources/kb-improvement.md +1 -1
- package/agent-plugin/skills/kibi-usage/resources/logic-ir.md +2 -2
- package/agent-plugin/skills/kibi-usage/resources/operation-access.md +29 -1
- package/agent-plugin/skills/kibi-usage/resources/ui-requirements.md +4 -4
- package/agent-plugin/skills/kibi-usage/resources/workflows.md +42 -25
- package/bin/launch-kibi-mcp.mjs +4 -1
- package/commands/kibi-bootstrap.md +4 -1
- package/dist/.cursor-plugin/plugin.json +1 -1
- package/dist/bin/launch-kibi-mcp.mjs +4 -1
- package/dist/commands/kibi-bootstrap.md +4 -1
- package/dist/guidance.d.ts +8 -0
- package/dist/guidance.js +13 -0
- package/dist/hook-runner.d.ts +12 -0
- package/dist/hook-runner.js +98 -2
- package/dist/skills/.canon-hash.json +9 -9
- package/dist/skills/kibi-bootstrap/SKILL.md +52 -11
- package/dist/skills/kibi-bootstrap/resources/bootstrap.md +12 -1
- package/dist/skills/kibi-usage/SKILL.md +82 -18
- package/dist/skills/kibi-usage/resources/fact-lanes.md +5 -5
- package/dist/skills/kibi-usage/resources/kb-improvement.md +1 -1
- package/dist/skills/kibi-usage/resources/logic-ir.md +2 -2
- package/dist/skills/kibi-usage/resources/operation-access.md +29 -1
- package/dist/skills/kibi-usage/resources/ui-requirements.md +4 -4
- package/dist/skills/kibi-usage/resources/workflows.md +42 -25
- package/dist/source-linked-requirements.d.ts +13 -3
- package/dist/source-linked-requirements.js +14 -15
- package/package.json +2 -2
- package/skills/.canon-hash.json +9 -9
- package/skills/kibi-bootstrap/SKILL.md +52 -11
- package/skills/kibi-bootstrap/resources/bootstrap.md +12 -1
- package/skills/kibi-usage/SKILL.md +82 -18
- package/skills/kibi-usage/resources/fact-lanes.md +5 -5
- package/skills/kibi-usage/resources/kb-improvement.md +1 -1
- package/skills/kibi-usage/resources/logic-ir.md +2 -2
- package/skills/kibi-usage/resources/operation-access.md +29 -1
- package/skills/kibi-usage/resources/ui-requirements.md +4 -4
- package/skills/kibi-usage/resources/workflows.md +42 -25
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-cursor",
|
|
3
3
|
"displayName": "Kibi",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
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,10 +1,81 @@
|
|
|
1
1
|
# kibi-cursor
|
|
2
2
|
|
|
3
|
+
## 2.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f8fff87: The telemetry acceptance and remediation reports now show whether agents look requirements up before they change requirement-linked code. A new `lookup_before_first_edit` metric gives, per host session, the share of sessions that ran `kb_search` or `kb_query` (through MCP or the CLI) before their first edit of a file whose symbols implement a requirement. Sessions that edited first appear in the report with the file and its exact `.kb/usage.log` line. The data comes from opt-in hook rows that every Kibi host plugin now writes when `KIBI_DIAGNOSTIC_MODE` is set; nothing is recorded otherwise.
|
|
8
|
+
|
|
9
|
+
- `kibi usage-metrics` / `kb_check` telemetry acceptance: new metric `lookup_before_first_edit` (threshold `>=` policy `lookupBeforeFirstEditMinimum`, default 1) with evidence `unguidedEditPaths` and `lookupOperations`. It is `not_applicable` when no host hook recorded a requirement-linked edit, so logs without hook rows are judged as before. A failed metric adds the advisory diagnostic `lookup_before_first_edit_bypassed` (rank 35).
|
|
10
|
+
- `kibi usage-remediation`: one event item per session whose first linked edit had no earlier lookup, pointing at that hook row.
|
|
11
|
+
- `parseTelemetryUsageLog` still returns only Kibi operation rows; hook rows stay attached to the returned array (read them with `partitionTelemetryUsage`). Remediation `logLine` values now count hook rows and blank lines, so they match the file.
|
|
12
|
+
- `kibi-agent-core/hook-usage-log`: shared `appendHookUsage` / `appendHookUsageRows`, `kbUsageTrace` and `editTraces`. Hook rows (`interface: "hook"`) carry `host`, `session_id`, `hook_action` (`kb_usage` or `edited`), `kb_operation`, `path`, `path_kind` and `requirement_ids`. `hostKbOperation` recognizes MCP tool names and `kibi <route>` shell commands; `extractEditedPaths` reads `apply_patch` headers.
|
|
13
|
+
- Claude Code: `edited` rows now carry the file's `requirement_ids`, and every row names its `host`. Cursor (`postToolUse`), Codex and ZCode (`PostToolUse`) and OpenCode (`tool.execute.after`) now write the same `kb_usage` and `edited` rows.
|
|
14
|
+
|
|
15
|
+
- 1012d1c: When an agent edits a file that implements a requirement, every Kibi host plugin (Claude Code, Cursor, Codex, ZCode and OpenCode) now says what that requirement must keep true and the decision behind it, not just its ID. The extra lines come from the requirement's linked facts and ADR, so agents see the constraint before they change the code. All hosts build the snippet with one shared builder in `kibi-agent-core`, so they show the same lines within each host's size limits, and none of them presents a superseded or retired requirement as current.
|
|
16
|
+
|
|
17
|
+
- New `kibi-agent-core/snippets` export: `fileKnowledgeSnippet`, `requirementGroundingLines`, `editKnowledgeContext`, `editFocus` and `createEntitySummarizer`. Edit snippets add "`<REQ>` must keep true: …" (up to two facts linked via `constrains`, `requires_property`, `requires_predicate` or `requires_rule`) and "Decision: `<ADR>`" for the lead requirement. Read snippets keep the requirement and test lines only.
|
|
18
|
+
- A superseded, deprecated or retired lead requirement gets no "must keep true" or "Decision" lines, so retired policy is not shown as current.
|
|
19
|
+
- Claude Code: the `PreToolUse` edit snippet now comes from the shared builder (no change in content).
|
|
20
|
+
- Cursor: `preToolUse` edit guidance and `beforeReadFile` / read guidance include the shared snippet for files whose symbols implement a requirement, followed by the existing "query before you change it" follow-up.
|
|
21
|
+
- Codex: `PreToolUse` on `apply_patch` (and other edit tools) returns the snippet as `additionalContext`, for up to three changed files per call and once per file per session. Paths come from the patch's `*** Update/Add/Delete File:` headers.
|
|
22
|
+
- ZCode: `PreToolUse` on edit tools returns the snippet as `additionalContext`, including "The edit is inside `<symbol>`" when the edited text is found, once per file per session.
|
|
23
|
+
- OpenCode: the edit-guidance system prompt adds one "must keep true … Decision …" bullet (one fact) for the focus file, within the existing word budget.
|
|
24
|
+
- `readEntitySummary` returns frontmatter `links` (plain entries read as `relates_to`; `type` and `target` in either order) merged with the entity's records in `.kb/relationships` shards, so grounding stored only in shards still reaches the snippet.
|
|
25
|
+
- Session and discovery hints point at `kb_search` questions and its answer layer instead of asking for `rankingMode: "intent-v1"`, which is now the default.
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- 89870c1: Bootstrap now checks its write actions before review and application, so ordinary require/forbid claims can be applied without malformed facts or semantic-inventory failures. Invalid and ungroundable claims remain cited authoring follow-ups; product intent receives priority over repository observations, and excluded or unreadable candidates are reported. Deterministic failures stop in a terminal journal with committed actions listed and guidance to re-plan; interrupted writes still recover.
|
|
30
|
+
|
|
31
|
+
Encode polarity as an `eq` boolean `true` comparison with a require/forbid modifier in the shared strict builder, retaining existing stable IDs. Add writer-schema and semantic-inventory preflight, per-claim extraction diagnostics, task-list normalization, selection accounting, and terminal failure reporting through CLI/MCP status and result envelopes.
|
|
32
|
+
|
|
33
|
+
Migration: KB schema 7 makes `strict-fact-shape` a blocking canonical check. Run `kibi migrate --yes`, then `kibi sync`. The migration rewrites legacy polarity-only property facts to the typed boolean encoding while preserving IDs, polarity, relationships, and document bodies. Other malformed strict facts require explicit correction; they are not treated as proof.
|
|
34
|
+
|
|
35
|
+
- 15356de: Host hooks no longer ask for a `kb_check` after a `kb_upsert` dry run. A dry run only validates, so the Cursor, Codex, ZCode and OpenCode hooks now count it as validation rather than a KB write.
|
|
36
|
+
|
|
37
|
+
- `extractKbMcpToolCall` reports `kb_upsert` with `dryRun: true` as `kb_validate_upsert`.
|
|
38
|
+
- OpenCode's freshness evidence records a dry-run upsert as `kb_validate_upsert`, which carries no mutation evidence.
|
|
39
|
+
|
|
40
|
+
- 1012d1c: Kibi keeps answering from the right place when you work in a git worktree, a detached checkout, or on a machine without Prolog. Host launchers no longer pin the MCP server to the first workspace, so per-call workspace routing keeps working, and a missing Prolog runtime points at `kibi doctor` instead of failing opaquely.
|
|
41
|
+
|
|
42
|
+
- Claude Code, Codex, Cursor and Z Code launchers set `KIBI_MCP_ATTACH_ROOT` instead of `KIBI_WORKSPACE`; the server starts in that directory without disabling routing. `KIBI_WORKSPACE`, `KIBI_PROJECT_ROOT` and `KIBI_ROOT` still pin.
|
|
43
|
+
- A detached HEAD whose commit is the tip of exactly one local branch attaches that branch's KB.
|
|
44
|
+
- `kb_status` reports `swipl_*` error codes with a `kibi doctor` remediation when the Prolog runtime cannot be resolved.
|
|
45
|
+
- CI and publish check that the committed Claude hook bundle matches its source.
|
|
46
|
+
|
|
47
|
+
- Updated dependencies [15356de]
|
|
48
|
+
- Updated dependencies [f8fff87]
|
|
49
|
+
- Updated dependencies [1012d1c]
|
|
50
|
+
- kibi-agent-core@0.2.0
|
|
51
|
+
|
|
52
|
+
## 2.2.0
|
|
53
|
+
|
|
54
|
+
### Minor Changes
|
|
55
|
+
|
|
56
|
+
- f93dcdd: Bootstrap no longer learns only from the code. The agent now starts with a short interview: it asks where product intent already lives (issue trackers such as Jira or YouTrack, wikis, specs, decision logs), which sources are authoritative or stale, and reads them through its own connectors. The bootstrap plan records those sources and the intent claims harvested from them, so each requirement taken from a ticket or page cites it and the citation is part of the approved plan hash. Kibi still never contacts those sources itself.
|
|
57
|
+
- feat(cli): `kb_plan_bootstrap` / `plan-bootstrap` accept `bootstrapContext.knowledgeSources` (id, kind, title, locator, authority, optional connector) and `bootstrapContext.intentClaims` (statement, sourceId, reference, optional excerpt). Both are normalized into `declaredContext` and bound into `planHash`. Grounded claims from authoritative or supporting sources become `req` candidates with `sourceKind: intent_claim`, citation evidence, and `text_ref: <sourceId>:<reference>`. Ungroundable claims become authoring follow-ups, stale sources are suppressed with `stale_knowledge_source`, and claims citing undeclared sources are reported as non-blocking diagnostics. A `needs_context` plan without declared sources asks for them.
|
|
58
|
+
- feat(skills): `kibi-bootstrap` 3.1.0 leads with the source interview before planning; the MCP `/kibi-bootstrap` prompt and the Cursor and ZCode commands follow it.
|
|
59
|
+
- docs: README, landing page, quick start, and install guide lead with a copy-paste agent setup prompt; manual installation moves behind a toggle.
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- 676bac9: The Claude Code, Codex, Cursor, and ZCode plugins now tell the Kibi MCP server which workspace each call is about, so sessions working in a git worktree are answered from that worktree's branch instead of the checkout the server started in. Nothing changes for sessions that stay in one project.
|
|
64
|
+
|
|
65
|
+
- Each plugin's pre-tool hook adds `workspaceRoot`, the agent's current Kibi workspace, to every Kibi MCP call. Claude Code, Cursor, and ZCode send it without a permission decision so the host's own approval flow is unchanged; Codex requires `permissionDecision: "allow"` for input rewrites, which does not override a server's tool approval mode.
|
|
66
|
+
- `kibi-agent-core` exports `KIBI_WORKSPACE_ARGUMENT`, `isKibiMcpToolName`, and `stampKibiWorkspace` for the plugins.
|
|
67
|
+
- The Codex hook parser now reads `hook_event_name`, the field Codex actually sends; the Claude and ZCode `PreToolUse` matchers include `mcp__.*__kb_.*`.
|
|
68
|
+
- The ZCode launcher sets `KIBI_MCP_HOST=zcode` so its usage rows are attributed like the other hosts'.
|
|
69
|
+
|
|
70
|
+
- Updated dependencies [676bac9]
|
|
71
|
+
- kibi-agent-core@0.1.1
|
|
72
|
+
|
|
3
73
|
## 2.1.1
|
|
4
74
|
|
|
5
75
|
### Patch Changes
|
|
6
76
|
|
|
7
77
|
- 7aa1471: Kibi can now run without a hand-installed SWI-Prolog. It looks for an explicit `KIBI_SWIPL` executable first, then the tested SWI-Prolog build shipped in the new `kibi-swipl` platform packages, and only then `swipl` on `PATH` (9.0 or newer). `KIBI_SWIPL=system` skips the bundle. `kibi doctor` now reports which runtime was chosen (source, path, version), checks that every required library loads, and explains which platform package to add when the bundle is missing. A running Kibi engine that was started with a different SWI-Prolog is restarted instead of reused. Release builds now ship the tested SWI-Prolog for Linux x64, Linux arm64, macOS arm64, and macOS x64 inside the `kibi-swipl-<platform>` packages, and an install that skips optional dependencies still succeeds and explains which package to add.
|
|
78
|
+
|
|
8
79
|
- kibi-cli: add `resolveSwipl()` (env, bundled with manifest and SHA-256 verification, PATH), a per-process cache, and `SWI_HOME_DIR` for bundled builds in both `PrologProcess` spawn paths.
|
|
9
80
|
- kibi-cli: engine handshake and requests carry the resolved `<bin>@<version>`; the daemon rejects mismatches and clients replace a mismatched daemon.
|
|
10
81
|
- kibi-cli: `doctor` SWI-Prolog check uses the resolver and loads all required libraries.
|
|
@@ -14,6 +85,7 @@
|
|
|
14
85
|
- New packages `kibi-swipl` and `kibi-swipl-<platform>` start at 1.0.0 outside this changeset and version together through a changesets fixed group.
|
|
15
86
|
|
|
16
87
|
- db5376c: Projects can now opt into impact reviews that bind a change to its exact source, knowledge decisions and trusted analysis policy. Kibi validates both staged changes and a complete pull-request diff, rejects stale review evidence, and lets agents prepare an unauthored review template through the CLI or MCP instead of hand-assembling one. Every decision and reviewer field stays for an agent to write; preparation never approves or proves anything.
|
|
88
|
+
|
|
17
89
|
- Add versioned impact policy and review schemas, immutable review fingerprints, reviewed Python decorator coordinate migration and the trusted aggregate `check-diff` command.
|
|
18
90
|
- Add the read-only `prepare-impact-review --input` CLI route and `kb_prepare_impact_review` MCP operation; regenerate the bundled operation-access catalog for the agent integrations.
|
|
19
91
|
- Keep the sample CI workflow inactive until it is adopted on a protected target.
|
|
@@ -39,22 +111,26 @@
|
|
|
39
111
|
reports them with a prefix, such as `mcp__kibi__kb_check`. Before this fix,
|
|
40
112
|
an agent that correctly ran an impact check through a prefixed tool name
|
|
41
113
|
still got a stop reminder to run it, because the plugin never saw the check.
|
|
114
|
+
|
|
42
115
|
- `kb-mcp-tools.ts` in each adapter gains `canonicalKbToolName`, which strips
|
|
43
116
|
`mcp__<server>__`, `MCP:`, and `kibi_` prefixes before matching `kb_*`
|
|
44
117
|
operations.
|
|
45
118
|
- The Codex hook bundle is regenerated.
|
|
46
119
|
|
|
47
120
|
- 25f11b1: The badge that `kibi init --github` adds to your README now links to the published explanation of the `% proven` metric at https://looted.github.io/kibi/ instead of the GitHub rendering of the Markdown source. The Kibi documentation site moved to the root of that domain, with the requirement-health report still under `/kibi-report/`. The Cursor and OpenCode package READMEs also link to the published guides, so the links work when you read them on npm.
|
|
121
|
+
|
|
48
122
|
- cli: `KIBI_METRIC_DOCS_URL` points at `https://looted.github.io/kibi/guide/github-integration.html#what-the-badge-means`.
|
|
49
123
|
- cursor, opencode: README setup and troubleshooting links point at the published guide pages instead of repository-relative or GitHub blob URLs.
|
|
50
124
|
- repo tooling (not published): the docs site builds into the GitHub Pages root and renders `llms.txt` as one H2 link list per catalog group from the shared page metadata.
|
|
51
125
|
|
|
52
126
|
- 5a06c03: Kibi's agent plugins now share one fast, consistent implementation for source-path classification, Kibi MCP tool recognition, and symbol-manifest indexing. Codex and ZCode now recognize production code outside `src/`, while Cursor reuses the same size-and-mtime-keyed scanner as Claude instead of parsing the full symbol manifest before an edit.
|
|
127
|
+
|
|
53
128
|
- Add `kibi-agent-core` as the common Node 18-compatible hook-helper package.
|
|
54
129
|
- Keep host adapters thin while preserving their host-specific event and state contracts.
|
|
55
130
|
- Replace Cursor's YAML parser dependency with the shared cached line scanner.
|
|
56
131
|
|
|
57
132
|
- f01838e: Usage telemetry stays off by default for every client, and there is now a supported way to turn it on. Previously the only way to capture usage was to hand-write an MCP command line with `--diagnostic-mode`, which meant anyone using a shipped plugin recorded nothing at all and had no documented alternative. Operators can now opt in with an environment variable, and once they do, each row identifies the host, package version, and checkout that produced it, so behavior can be compared across editors, worktrees, and Kibi versions.
|
|
133
|
+
|
|
58
134
|
- Honor `KIBI_DIAGNOSTIC_MODE=1` alongside the existing `--diagnostic-mode` flag, for hosts where a plugin owns the MCP command line.
|
|
59
135
|
- Stamp `interface`, `host`, `package_version`, and `workspace_root` on every usage row.
|
|
60
136
|
- Set `KIBI_MCP_HOST` from the Cursor and Codex launchers for attribution only; it never enables logging, and installing or enabling a plugin never starts telemetry.
|
|
@@ -66,6 +142,7 @@
|
|
|
66
142
|
When you model a new requirement, Kibi now ranks the subjects that already exist and either reuses one or explicitly declares a new one. It also flags claims that look like possible duplicates. An intentional restatement can be recorded with the new `restates` relationship. Skills and docs now recommend naming entities by the behavior they govern (`REQ-cli-gc`) instead of a sequence number (`REQ-042`). Existing numbered IDs stay valid.
|
|
67
143
|
|
|
68
144
|
Predicate schemas can now declare the allowed values for an argument, plus the old spellings that map onto them. New facts must use those values. `kibi check` reports predicate facts that don't match any schema, and `kibi migrate` can fix the mechanical cases after you approve the plan hash. It moves a fact to the only namespace whose schema matches, and rewrites old spellings to the declared value. Everything that needs judgment stays a review item.
|
|
145
|
+
|
|
69
146
|
- core: new `semantic_quality.pl` (`entity-id-style`, `domain-redundancy`, `domain-implication`, `subject-key-identity`, `subject-key-shape`, `ontology-quality`) and `units.pl`. Unit canonicalization is used for comparison only, and unknown or ambiguous units such as `KB` are never equated. Adds the `restates` req→req relationship and an optional `diagnosticSeverity` in the rule registry. Adds `:- encoding(utf8)` to modules that contain non-ASCII text.
|
|
70
147
|
- cli/mcp: `restates` is wired through the extractors, schemas, and mutation paths. `entity-id-style` warnings are reported on `kb_upsert` creates and on staged added or renamed entity files. `kb_model_requirement` returns `vocabularyAlignment` (subject decision, candidates, redundancy candidates, stamps, `fallbackUsed`). Ontology-quality thresholds can be set with `KIBI_ONTOLOGY_QUALITY_MAX_SINGLETON_RATIO` / `KIBI_ONTOLOGY_QUALITY_MIN_FACTS`. `kb_compile_intent` create mode now keeps a caller-supplied `requirementId`. `kibi check --staged` now also prints its pass line when metadata-only staged changes have only advisory findings, matching the staged-symbol path.
|
|
71
148
|
- cli/mcp: `predicate_schema` facts accept `argument_constants` and `argument_aliases`, stored like `rule_ir` as JSON. `kb_upsert` / `kb_validate_upsert` reject malformed vocabularies and predicate facts that use undeclared values or aliases. `kb_suggest_predicates` binds aliases to their constant and leaves undeclared values unbound. The new advisory TypeScript rule `predicate-schema-conformance` checks predicate facts against project schemas and the built-in catalog. Its mechanical repairs become automatic `predicate_schema_alignment` migration actions that carry the exact `kb_upsert` input and re-read the fact before writing.
|
|
@@ -83,11 +160,13 @@
|
|
|
83
160
|
### Patch Changes
|
|
84
161
|
|
|
85
162
|
- 96a1ebd: Local Cursor MCP builds now compile plugin SDK/builtin dist before the CLI, so a fresh checkout no longer fails with a missing `kibi-plugin-builtin` type package.
|
|
163
|
+
|
|
86
164
|
- `build:cli-stack` runs plugin-sdk + plugin-builtin + CLI
|
|
87
165
|
- Worktree resolver uses that stack instead of `build:cli` alone
|
|
88
166
|
|
|
89
167
|
- 188f875: No user-facing behavior change: `kibi-runtime` now resolves its bundled-skills directory lazily on first use instead of at import time, `isWithinRoot` drops a redundant same-path comparison, `kibi-cursor` drops a provably dead `planDelivered` early return and an always-true stdin branch, and the hook runners' stdin buffering is simplified to an unconditional `Buffer.from`. The reshaping lets the new mutation-testing suite (`docs/mutation-testing.md`, run via `bun run test:mutation`) prove these paths exhaustively — the suite holds a 100% mutation score over `kibi-runtime`, `kibi-codex`, and `kibi-cursor` sources.
|
|
90
168
|
- db07d8f: Proof diagnostics now agree with the Prolog decision: a structural type-shape unit contract is shown as qualifying, `kibi proof impact` compares against the Git HEAD baseline and exits 0 after a successful report, and mixed-role symbols fail the strict proof integrity gate.
|
|
169
|
+
|
|
91
170
|
- Mode-aware candidate evaluation in Prolog; receipt fallback uses `test_receipt_evidence(Context, TestId, Evidence)`.
|
|
92
171
|
- `proof impact` reads `HEAD:proof/baseline.json` with no worktree fallback; diagnostic exit 0.
|
|
93
172
|
- Strict proof workflow and baseline checker include canonical `symbol-traceability`.
|
|
@@ -103,6 +182,7 @@
|
|
|
103
182
|
### Major Changes
|
|
104
183
|
|
|
105
184
|
- 812c201: Kibi's proof layer is now runner-neutral: any test runner, script, or harness can prove requirements, and Playwright is no longer built into the proof model.
|
|
185
|
+
|
|
106
186
|
- `kibi prove` replaces `kibi verify` as the single command to run configured proof producers and record evidence. Proof contracts (`kibi.proof-contract.v1`) declare explicit obligations (`symbol_id` + `target`) executed by a configured integration in `.kb/proof/integrations.json`; `kibi proof inspect` discovers test infrastructure deterministically; one producer run can satisfy many test contracts, and re-ingestion is idempotent.
|
|
107
187
|
- Evidence moves to the `kibi.proof-run.v1` artifact (typed environment, run-level outcome, factual attempt history with `native_case`/`aggregate_run` provenance) evaluated into `kibi.proof-receipt.v1` receipts bound to the live snapshot, contract hash, and effective execution fingerprint. Command proof is the universal fallback, so every project can prove requirements without a first-party framework adapter; strict first-attempt policy never upgrades unknown attempt history into passing evidence.
|
|
108
188
|
- Breaking removals: `kibi verify`, `kb_ingest_verification`, `kibi.playwright-run.v1`, `verification_contract`/`verification_receipts` entity fields (replaced by `proof_contract`/`proof_bindings`/`proof_receipts`), the `required_case_symbols`×`required_projects` Cartesian contract, and `retries` fields. Migrate by re-running `kibi prove` after bootstrap configures proof for your repository.
|
|
@@ -112,10 +192,12 @@
|
|
|
112
192
|
### Patch Changes
|
|
113
193
|
|
|
114
194
|
- b0271ac: Cursor now starts the bundled Kibi MCP server reliably when it launches plugin processes from a home directory or another unrelated working directory. Consumer workspaces with spaces continue to resolve their project-local `kibi-mcp` installation, while the portable Agent Plugin keeps its separate `npx --no-install` configuration.
|
|
195
|
+
|
|
115
196
|
- Fix `kibi-cursor` MCP launcher arguments to use Cursor's `${CURSOR_PLUGIN_ROOT}` expansion.
|
|
116
197
|
- Add source-install manifest regression coverage for consumer-local resolution from unrelated host directories.
|
|
117
198
|
|
|
118
199
|
- b1682f1: Agents receive clearer guidance for repairing the actual supplied mutation request and preserving approved predicate bindings. The scoped additions retain the existing workflow while separating payload recovery from conditional relational modeling.
|
|
200
|
+
|
|
119
201
|
- Update `kibi-usage` to 2.1.2 in CLI/runtime sources and the generated Codex/Cursor distributions.
|
|
120
202
|
- Preserve the other three skills and all existing resource content.
|
|
121
203
|
- Retain production-adoption safeguards; development comparisons are not held-out evidence.
|
|
@@ -124,10 +206,12 @@
|
|
|
124
206
|
same entry paths tests already spawn as processes. In-process coverage can
|
|
125
207
|
exercise stdin, CLI guards, and realpath failures instead of leaving those
|
|
126
208
|
lines invisible to Codecov.
|
|
209
|
+
|
|
127
210
|
- Export hook CLI helpers and Agent Plugin / launcher internals for tests.
|
|
128
211
|
- Use a namespace `fs` import in skill validation so realpath errors are testable.
|
|
129
212
|
|
|
130
213
|
- 5999143: Agent-facing skill docs now use the current status field names, so agents following the freshness and E2E receipt workflows look for fields that actually exist in `kb_status` output instead of stale ones.
|
|
214
|
+
|
|
131
215
|
- Bundled `kibi-freshness` and `kibi-usage` skills (all agent mirrors) now reference `proofSnapshotChanges` and `proofSnapshot` (previously `verificationSnapshotChanges`/`verificationSnapshot` from the pre-proof-architecture status schema).
|
|
132
216
|
- The skillopt-eval harness reads `proofSnapshot*` status fields and its held-out eval prompts name the current fields, so "dirty editor path" evidence gathering works against live status output again.
|
|
133
217
|
|
|
@@ -149,6 +233,7 @@
|
|
|
149
233
|
- 9e6fb3f: Kibi now uses one opinionated project contract: all Kibi-managed knowledge lives under `.kb/`, check enforcement is owned by the installed Kibi version, and projects can no longer weaken health by disabling rules or relocating entity paths in `.kb/config.json`. Existing repositories must run `kibi migrate --yes` to move legacy `documentation/...` knowledge into the canonical layout and adopt `.kb/manifest.json`.
|
|
150
234
|
|
|
151
235
|
Advisory modeling checks still run by default, but they report as non-blocking quality diagnostics instead of failing `kibi check`. Migration rewrites the old blanket `.kb/` gitignore stanza so authored lanes are trackable, and a malformed leftover `config.json` blocks the one-way cutover instead of guessing default paths.
|
|
236
|
+
|
|
152
237
|
- Remove user-configurable entity paths and persistent `checks.rules` overrides; retire `.kb/config.json` after migration.
|
|
153
238
|
- Introduce `.kb/manifest.json` for Kibi-owned lifecycle metadata (schema version, semantic backfill state).
|
|
154
239
|
- Add one-way legacy storage migration (`documentation/` and custom configured paths → `.kb/<lane>/`).
|
|
@@ -173,6 +258,7 @@
|
|
|
173
258
|
effect and repair information, while branch stores are hashed and explicitly
|
|
174
259
|
identity-bound. The mutation path can author tracked source documents and
|
|
175
260
|
canonical relationship shards without staging or committing them.
|
|
261
|
+
|
|
176
262
|
- Add the `kibi-runtime` first-party integration package.
|
|
177
263
|
- Add exact branch-store manifests, explicit legacy migration/quarantine, and
|
|
178
264
|
typed result/effect contracts.
|
|
@@ -180,20 +266,24 @@
|
|
|
180
266
|
approval plans.
|
|
181
267
|
|
|
182
268
|
- 3d7d04f: Generic MCP and CLI agents now discover Kibi's operating rules from bundled skills instead of a long copy-paste prompt. Improving an existing product KB is covered by a `kibi-usage` resource rather than a second manual, so agent guidance stays in one place and cannot drift from the packaged workflow.
|
|
269
|
+
|
|
183
270
|
- Add `kibi-usage` `resources/kb-improvement.md` and bump that skill to 2.1.0.
|
|
184
271
|
- Replace `docs/prompts/llm-rules.md` with `docs/generic-agent-onboarding.md`.
|
|
185
272
|
- Remove the obsolete retroactive-init prompt; bootstrap stays in the `kibi-bootstrap` skill.
|
|
186
273
|
|
|
187
274
|
- 29793c7: The Cursor stop hook no longer starts an extra Kibi follow-up after you only deliver a plan. Reads and search no longer look like source edits, so plan mode can finish without an impact-check nudge. If that same turn actually edited source or updated the knowledge base, the existing follow-up still runs.
|
|
275
|
+
|
|
188
276
|
- Record dirty paths only from known editable tools.
|
|
189
277
|
- Treat `CreatePlan` as plan delivery and stay silent at stop unless that turn also edited source or mutated the KB.
|
|
190
278
|
- Skip follow-up when `stop.status` is `aborted` or `error`.
|
|
191
279
|
|
|
192
280
|
- 8db2e37: Cursor plugin users can now enable Kibi without adding a separate project MCP configuration. The plugin finds the `kibi-mcp` version installed in the opened project, starts it inside that workspace, and reports a clear setup error when the dependency is missing. It never downloads or falls back to a global Kibi runtime.
|
|
281
|
+
|
|
193
282
|
- Replace the plugin MCP `npx --no-install` command with the packaged consumer-workspace launcher.
|
|
194
283
|
- Cover isolated and packed plugin launches, workspace selection, package-layout resolution, exit codes, and signal forwarding.
|
|
195
284
|
|
|
196
285
|
- 535dea8: Agents can now keep working in synthetic, detached, or unreadable workspaces while Kibi reports the migration work it can evaluate. Coverage and checks preserve their useful domain results when branch status is unavailable, and the Codex/Cursor skill assets now stay aligned with their published plugin metadata.
|
|
286
|
+
|
|
197
287
|
- Keep status-derived migration actions read-only and append them only when branch resolution succeeds.
|
|
198
288
|
- Preserve the shared migration-plan contract across coverage and checks without requiring a Prolog-backed status query in non-Git harnesses.
|
|
199
289
|
- Synchronize plugin manifests and freshness skill CLI examples for the next coordinated patch release.
|
|
@@ -203,6 +293,7 @@
|
|
|
203
293
|
edges can no longer hide a newer contradictory policy merely by making that
|
|
204
294
|
newer requirement non-current. Relationship checks also block authored links
|
|
205
295
|
that have silently disappeared from compiled knowledge.
|
|
296
|
+
|
|
206
297
|
- Document `supersedes` as new-to-old across bundled and generated skills.
|
|
207
298
|
- Reject reversed supersession when tracked source history proves that the
|
|
208
299
|
purported replacement predates its target.
|
|
@@ -270,11 +361,13 @@
|
|
|
270
361
|
### Patch Changes
|
|
271
362
|
|
|
272
363
|
- de7b85a: Verification contracts can now evolve without forcing projects to erase valid historical test evidence. Kibi preserves every earlier receipt, accepts a newly appended receipt for the current contract, and only treats evidence matching both the current contract and live code snapshot as proof.
|
|
364
|
+
|
|
273
365
|
- Separate immutable receipt-history validation from current-contract binding during verification ingest.
|
|
274
366
|
- Report `verification_contract_mismatch` as an explicit proof gap until current-contract evidence is appended.
|
|
275
367
|
- Teach the usage skill and SkillOpt evaluator to preserve older-contract receipts and forbid history rewrites.
|
|
276
368
|
|
|
277
369
|
- 584336b: Agents now get consistent guidance when execution proof, structural coverage, and KB freshness disagree. Current-contract E2E evidence is recorded as v2 without rewriting history, and full checks no longer report a contradictory weak-depth warning when the same live receipt already proves the scenario-backed test. Receipt freshness repairs also identify the affected requirements and tests so agents can rerun the exact contract.
|
|
370
|
+
|
|
278
371
|
- Share snapshot-bound proof evidence with full quality diagnostics.
|
|
279
372
|
- Add bounded receipt-gap telemetry and v2-native remediation guidance.
|
|
280
373
|
- Document and test the new receipt and proof-aware diagnostic requirements.
|
|
@@ -282,6 +375,7 @@
|
|
|
282
375
|
- Keep the MCP package contract verifier self-contained with an explicit semver development dependency and matching workspace lock ranges.
|
|
283
376
|
|
|
284
377
|
- Kibi can now explain a missing or damaged branch-local KB without changing it. Agents receive a precise recovery path, preserving the existing store before a deliberate rebuild, and no longer need to guess whether a clean check also means a clean, fresh KB.
|
|
378
|
+
|
|
285
379
|
- Add non-mutating branch-store inspection to status and a preview-first `kibi branch recover --apply` workflow.
|
|
286
380
|
- Restrict branch migration to the detected historical `master` -> legacy `main` compatibility attachment; arbitrary branch moves are refused.
|
|
287
381
|
- Refresh CLI/MCP status documentation, mirrored agent skills, and release-gate packed consumer coverage.
|
|
@@ -317,6 +411,7 @@
|
|
|
317
411
|
Diagnostic workflows now produce correlated evidence through both CLI JSON and MCP surfaces. Operators can run a read-only versioned remediation report that points to exact unmatched log events, preserves explicit missing-coverage work, and prevents advisor or preflight evidence from a different identified session or actor from counting as proof.
|
|
318
412
|
|
|
319
413
|
Legacy prose can now be inspected one requirement at a time through a deterministic migration preview. The preview preserves existing code evidence, binds every extracted proposition to exact authored source, ranks project-local ontology candidates, and never emits an auto-applicable write.
|
|
414
|
+
|
|
320
415
|
- Add the shared `kibi.requirement-proof.v2` Prolog evaluator and expose its rows, fresh receipt evidence, and summary counts through CLI and MCP coverage.
|
|
321
416
|
- Persist generated symbol coordinates and symbol metadata into normal and staged RDF projections.
|
|
322
417
|
- Preserve semantic-inventory JSON through mutation, sync, RDF storage, and query round trips, and refresh coordinates before extracting their manifest overlay.
|
|
@@ -338,22 +433,26 @@
|
|
|
338
433
|
### Patch Changes
|
|
339
434
|
|
|
340
435
|
- 5e4e126: Agents no longer treat Kibi's CLI as an MCP fallback. MCP tools and the trusted project-local CLI are presented as peer surfaces over the same 18 operations, and agent guidance now selects whichever interface is visible and approved in the current environment. The CLI's `--input` JSON routes remain first-class for agent automation, with no preference order implied.
|
|
436
|
+
|
|
341
437
|
- Reframe `kibi-usage` Interface Selection and the operation-access preference column to peer surfaces.
|
|
342
438
|
- Update OpenCode prompt injection, enforcement, and init-kibi guidance.
|
|
343
439
|
- Update the MCP init-kibi prompt and the staged-impact evidence resolution text.
|
|
344
440
|
- Re-sync the Cursor and Codex skill bundles.
|
|
345
441
|
|
|
346
442
|
- Codex and Cursor users now receive the same verified prose-to-logic guidance as the Kibi CLI. The bundled `kibi-usage` skill explains proposition coverage, typed Logic IR safety, predicate recovery, and contradiction-aware validation without relying on repository-specific release conventions.
|
|
443
|
+
|
|
347
444
|
- Synchronize the Logic IR, fact-lane, workflow, and portable skill guidance into both agent bundles.
|
|
348
445
|
- Keep the bundled skill manifests and canonical hashes aligned with the CLI public skill.
|
|
349
446
|
|
|
350
447
|
- 5e4e126: Kibi now ships as a portable Agent Plugin alongside the existing Cursor Plugin. The open Agent Plugins standard (agent-plugins.org) packages Kibi's Agent Skills and MCP server so any compatible client — Cursor, Copilot, OpenCode, and others — loads Kibi's capabilities without client-specific adaptation. The Cursor Plugin keeps Cursor-only components (rules, commands, hooks), and both formats are listed in the same marketplace.
|
|
448
|
+
|
|
351
449
|
- Add a committed portable Agent Plugin artifact at `agent-plugin/` with a conformant `plugin.json` manifest (plugin.schema.json 1.0.0).
|
|
352
450
|
- Generate the artifact's `mcp.json` with the required `$schema` and `stdio` server type.
|
|
353
451
|
- List the Agent Plugin (`plugins/kibi-agent-plugin`) in the repo marketplace alongside `kibi-cursor`.
|
|
354
452
|
- Add `scripts/build-agent-plugin.ts` to regenerate the artifact and keep its skills in sync with the canonical bundle.
|
|
355
453
|
|
|
356
454
|
- 2a85fc8: Kibi can now track whether every atomic clause in a normative requirement has a queryable logical representation. Readable prose remains intact, while stable claim keys, linked strict-property or predicate facts, and a requirement manifest expose incomplete modeling before it silently weakens contradiction detection. Exact opposite polarities over the same ground predicate now produce a contradiction.
|
|
455
|
+
|
|
357
456
|
- Remove repository-specific release and optimizer-corpus text from `kibi-usage`.
|
|
358
457
|
- Add portable clause-complete prose-to-ground-predicate/property guidance and examples.
|
|
359
458
|
- Preserve logical claim and predicate-schema fields through Markdown sync.
|
|
@@ -371,6 +470,7 @@
|
|
|
371
470
|
- 2f9073c: Kibi now ships optional guidance for recording UI and visual expectations, so agents working on a screen can discover "where things live" and cannot silently drift the layout. A prose requirement anchors the full visual description, checkable positions, alignment, and header ordering decompose into strict facts that reject conflicting writes, and relational alignment uses the built-in `visual_layout_rule` predicate. The lane is per-project: non-UI projects simply never model UI subjects, and no validation rule requires them.
|
|
372
471
|
|
|
373
472
|
Also, `kb_status` within a long-lived MCP session now observes same-session file and KB changes instead of returning a stale cached result. Compound Prolog goals (such as the status query) are no longer cached in one-shot mode, so a status check after a source or documentation edit reports the current freshness state.
|
|
473
|
+
|
|
374
474
|
- Add `docs/ui-requirements.md` with the three-layer UI modeling guide, payload-shaped examples, and the check workflow.
|
|
375
475
|
- Point the modeling cheatsheet decision tree, agent LLM rules, and the AGENTS quick references at the new UI lane.
|
|
376
476
|
- Add a self-contained `kibi-usage` skill resource (`resources/ui-requirements.md`), declare it in the skill manifest, and add a UI modeling workflow section.
|
|
@@ -402,10 +502,12 @@
|
|
|
402
502
|
### Patch Changes
|
|
403
503
|
|
|
404
504
|
- cafa25f: Agents can now select Kibi by available capability instead of stopping at MCP-specific guidance. The bundled skills prefer approved MCP tools, fall back safely to a project-local non-installing CLI runner, and provide executable JSON recipes plus an exact 18-operation access catalog.
|
|
505
|
+
|
|
405
506
|
- Document every shared MCP operation's dedicated CLI route, input mode, effects, Prolog requirement, mutability, and telemetry handling.
|
|
406
507
|
- Regenerate Cursor and Codex skill mirrors from the canonical capability-based source.
|
|
407
508
|
|
|
408
509
|
- 23e815a: Agents can now keep using Kibi when MCP tools are unavailable but a trusted project-local CLI is ready. Guidance across Cursor, OpenCode, and MCP documentation now selects the interface by capability and stops for operator action only when neither safe surface is available.
|
|
510
|
+
|
|
409
511
|
- Replace MCP-exclusive guidance with the visible-MCP, trusted-CLI JSON route, and blocked state machine.
|
|
410
512
|
- Preserve direct `.kb/` access prohibitions, discovery-before-mutation, sequential writes, and completion validation gates.
|
|
411
513
|
|
|
@@ -421,6 +523,7 @@
|
|
|
421
523
|
- f1db710: Kibi check outputs now have a stable advisory diagnostics lane for auditability review signals. Operators and MCP clients can receive `qualityDiagnostics` alongside hard `violations` without advisory-only findings changing pass/fail counts or exit behavior. Existing staged impact failures, including symbol granularity violations, remain blocking. Source impact analysis now also highlights overly broad symbols, indistinguishable symbol coordinates, and mixed-purpose component/class ownership as review-only guidance.
|
|
422
524
|
|
|
423
525
|
Technical summary:
|
|
526
|
+
|
|
424
527
|
- Add the public `QualityDiagnostic` type with `error`, `warning`, `review`, and `info` severities plus explicit `blocking` semantics.
|
|
425
528
|
- Preserve existing `violations`, `diagnostics`, and `impactDiagnostics` fields while adding MCP structured `qualityDiagnostics` output support.
|
|
426
529
|
- Preserve explicitly filtered MCP `kb_check` rule semantics so advisory full-KB quality scans only run for unfiltered checks or requested impact diagnostics.
|
|
@@ -435,6 +538,7 @@
|
|
|
435
538
|
- Kibi now gives agents source-impact feedback while they are still editing, instead of waiting for the commit hook to be the first signal. Meaningful source edits can be checked through MCP with changed-file impact diagnostics, so agents see coarse symbol ownership, stale symbol evidence, and semantic-review prompts while the source context is fresh. OpenCode, Cursor, and Codex adapters now steer agents toward that MCP-first workflow and keep CLI/hooks as the later safety net.
|
|
436
539
|
|
|
437
540
|
Technical summary:
|
|
541
|
+
|
|
438
542
|
- Add reusable CLI changed-file impact diagnostics and export them for MCP consumption.
|
|
439
543
|
- Extend MCP `kb_check` with source-file impact options and structured impact output.
|
|
440
544
|
- Update OpenCode, Cursor, and Codex guidance/hooks to request impact-enabled `kb_check` after source edits.
|
|
@@ -447,6 +551,7 @@
|
|
|
447
551
|
- Kibi now gives agents clearer guidance for the diagnostics flow, so the release notes should reflect that the bundled usage text and MCP logging story were tightened together.
|
|
448
552
|
|
|
449
553
|
This update also keeps the package mirrors aligned where applicable, which helps downstream plugin consumers stay in sync with the canonical guidance.
|
|
554
|
+
|
|
450
555
|
- Hardened bundled skill guidance for kibi usage.
|
|
451
556
|
- Improved MCP diagnostic logging shape and validation hints.
|
|
452
557
|
- Synced packaged skill copies where they are shipped with the release.
|
|
@@ -456,6 +561,7 @@
|
|
|
456
561
|
### Patch Changes
|
|
457
562
|
|
|
458
563
|
- 5d2975a: Cursor stop hooks no longer inject a long multi-line Kibi freshness reminder after every agent response. Follow-ups are now one line, and most sessions stay silent.
|
|
564
|
+
|
|
459
565
|
- Track `kb_upsert`, `kb_delete`, and `kb_check` MCP usage during the session.
|
|
460
566
|
- Emit no stop follow-up when nothing KB-relevant changed, or when `kb_check` already ran after edits.
|
|
461
567
|
- Emit a short summary (`Kibi KB updated (kb_upsert).`) after KB mutations, or a single-line sync nudge when source files changed without KB activity.
|
package/README.md
CHANGED
|
@@ -57,7 +57,10 @@ cp -r "$(npm root)/kibi-cursor" ~/.cursor/plugins/local/kibi-cursor
|
|
|
57
57
|
The plugin bundles `mcp.json` with a thin launcher that locates and starts the
|
|
58
58
|
`kibi-mcp` package installed in the opened project. The launcher starts the
|
|
59
59
|
resolved child from the consumer workspace and sets `KIBI_WORKSPACE` to that
|
|
60
|
-
root; it never downloads, bundles, or falls back to a global Kibi runtime
|
|
60
|
+
root; it never downloads, bundles, or falls back to a global Kibi runtime.
|
|
61
|
+
The `preToolUse` hook adds `workspaceRoot` (the agent's current workspace) to
|
|
62
|
+
every Kibi MCP call, so an agent working in a git worktree is answered from
|
|
63
|
+
that worktree's branch. Setting `KIBI_WORKSPACE` pins one workspace instead:
|
|
61
64
|
|
|
62
65
|
```json
|
|
63
66
|
{
|
|
@@ -119,8 +122,9 @@ agent-plugin/
|
|
|
119
122
|
Hooks are warning-only and never replace MCP/CLI behavior:
|
|
120
123
|
|
|
121
124
|
- **sessionStart**: bootstrap reminder when `.kb/manifest.json` is missing.
|
|
122
|
-
- **preToolUse**: warns on explicit direct `.kb/**` edits without blocking.
|
|
123
|
-
- **beforeReadFile** and **postToolUse (Read)**: inject source-linked lookup guidance once per path per session.
|
|
125
|
+
- **preToolUse**: warns on explicit direct `.kb/**` edits without blocking. Before the first edit of a file whose symbols implement a requirement, it adds the shared Kibi snippet (from `kibi-agent-core/snippets`, the same builder the Claude Code plugin uses): the requirements and their implementing symbols, what the lead requirement must keep true and the decision behind it, the covering tests, and the symbol the edit lands in. A superseded or retired lead requirement gets no "must keep true" or "Decision" line. Once per path per session.
|
|
126
|
+
- **beforeReadFile** and **postToolUse (Read)**: inject source-linked lookup guidance once per path per session, with the same snippet minus the "must keep true" and "Decision" lines.
|
|
127
|
+
- **postToolUse** (opt-in telemetry): with `KIBI_DIAGNOSTIC_MODE=1`, appends `interface: "hook"` rows with `host: "cursor"` to `.kb/usage.log` for `kb_*` lookups (MCP or `kibi <route>` in Shell) and for edited files with the requirements they implement, keyed by `conversation_id`. `kibi usage-metrics` reads them for the `lookup_before_first_edit` metric. Nothing is written without the variable.
|
|
124
128
|
- **postToolUse (Write/Edit)**: inject traceability and freshness guidance once per path per session, including `kb_check({sourceFiles:[...], includeImpactDiagnostics:true, includeWorkingTreeDiff:true})` for meaningful source edits.
|
|
125
129
|
- **stop**: emits a single freshness or impact-check follow-up when meaningful paths were **edited** during the turn (reads and search do not count). Plan delivery (`CreatePlan`) stays silent unless that same turn also edited source or mutated the KB.
|
|
126
130
|
|
package/agent-plugin/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "kibi",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
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://github.com/Looted/kibi/blob/develop/docs/install.md",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: kibi-bootstrap
|
|
3
3
|
name: kibi-bootstrap
|
|
4
|
-
description: Bootstrap Kibi from the current Git checkout with
|
|
5
|
-
version: 3.
|
|
4
|
+
description: Bootstrap Kibi from the current Git checkout and the project's existing knowledge sources, with a source interview, cited intent claims, preview approval, source-first writes, and repair-safe completion.
|
|
5
|
+
version: 3.1.1
|
|
6
6
|
kibiCompatibility: ">=1.0.0"
|
|
7
7
|
tags:
|
|
8
8
|
- kibi
|
|
@@ -18,20 +18,56 @@ resources:
|
|
|
18
18
|
## Goal
|
|
19
19
|
|
|
20
20
|
Seed branch-local Kibi knowledge for an attached but thin repository without
|
|
21
|
-
creating a parallel human-maintained ticket system.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
creating a parallel human-maintained ticket system. Code shows what the
|
|
22
|
+
system does, not why; intent usually lives elsewhere (issue trackers, wikis,
|
|
23
|
+
specs, decision logs). Lead a short interview to find those sources, harvest
|
|
24
|
+
cited intent from them, and let the planner consolidate it with repository
|
|
25
|
+
evidence. Agents own reading and translation; humans name the sources,
|
|
26
|
+
judge their authority, and resolve genuine ambiguity. A seeded repository
|
|
27
|
+
hands off to the normal Kibi workflow.
|
|
25
28
|
|
|
26
29
|
## Interface and preview
|
|
27
30
|
|
|
28
31
|
Use the visible approved MCP surface or the trusted project-local CLI as equal
|
|
29
|
-
peer interfaces. If neither is available, stop.
|
|
30
|
-
|
|
32
|
+
peer interfaces. If neither is available, stop. Interview first, then plan,
|
|
33
|
+
then preview the exact plan for approval.
|
|
34
|
+
|
|
35
|
+
## Interview first
|
|
36
|
+
|
|
37
|
+
Before planning:
|
|
38
|
+
|
|
39
|
+
1. Inventory what you can already read: your own MCP connectors and tools
|
|
40
|
+
(issue trackers such as Jira, YouTrack, Linear, or GitHub Issues; wikis such
|
|
41
|
+
as Confluence or Notion; drives and design tools), and in-repo docs, ADRs,
|
|
42
|
+
and specs.
|
|
43
|
+
2. Ask the human, in one message: what the repository is for; which of those
|
|
44
|
+
sources hold product intent; which are authoritative, supporting, or stale;
|
|
45
|
+
what is missing; and which product areas matter first. If an important
|
|
46
|
+
source has no connector, say which one and suggest connecting it, then
|
|
47
|
+
continue with what is reachable. Never invent access you lack.
|
|
48
|
+
3. Read the confirmed, non-stale sources through your connectors. Harvest one
|
|
49
|
+
normative statement per behavior, each citing its source and an exact
|
|
50
|
+
reference (ticket key, page URL, or section anchor). Keep the source's
|
|
51
|
+
meaning; do not merge, generalize, or resolve conflicts yourself.
|
|
52
|
+
|
|
53
|
+
Declare the result in `bootstrapContext`: `projectSummary`,
|
|
54
|
+
`knowledgeSources` (id, kind, title, locator, authority, optional connector),
|
|
55
|
+
and `intentClaims` (statement, sourceId, reference, optional excerpt). Kibi
|
|
56
|
+
never contacts those sources; it binds what you declare into the plan hash.
|
|
57
|
+
|
|
58
|
+
## Plan and approval
|
|
59
|
+
|
|
60
|
+
Run `kb_plan_bootstrap` (or `plan-bootstrap --input`) read-only with that
|
|
61
|
+
context. Grounded authoritative or supporting claims become cited `req`
|
|
62
|
+
candidates; claims the strict modeler cannot ground come back as authoring
|
|
63
|
+
follow-ups; stale sources produce no candidates; undeclared sources are
|
|
64
|
+
reported in diagnostics. If the plan returns `needs_context`, ask only its
|
|
31
65
|
bounded questions (never more than four), then rerun the planner. Show the
|
|
32
|
-
complete returned `structuredContent.plan`, including its canonical hash
|
|
33
|
-
|
|
34
|
-
`kb_apply_plan`; do not reconstruct
|
|
66
|
+
complete returned `structuredContent.plan`, including its canonical hash and
|
|
67
|
+
which candidates cite which sources, and get explicit approval before any
|
|
68
|
+
write. Pass that plan object unchanged to `kb_apply_plan`; do not reconstruct
|
|
69
|
+
it from preview fields. When a claim contradicts the code or another claim,
|
|
70
|
+
put it to the human instead of choosing.
|
|
35
71
|
|
|
36
72
|
For CLI JSON, use the trusted route with `--input` (for example
|
|
37
73
|
`printf '%s\n' '{}' | kibi status --input -`); MCP and CLI are semantic peers.
|
|
@@ -51,6 +87,11 @@ Finish with `kb_check` and `kb_status`.
|
|
|
51
87
|
Consume the versioned `kibiProtocol: 1` result envelope: inspect `status`, `effects`,
|
|
52
88
|
`diagnostics`, and `nextActions`. On `committed_with_repairs`, execute required
|
|
53
89
|
repair actions and never retry the original mutation.
|
|
90
|
+
On `BOOTSTRAP_PLAN_INVALID`, obtain a corrected preview and approval before
|
|
91
|
+
applying. On `BOOTSTRAP_PLAN_REJECTED`, inspect committed `data.actionResults`
|
|
92
|
+
and re-plan from the current state; the journal is terminal and cannot recover.
|
|
93
|
+
Review `suppressedCandidates`, `sourceOnlySignals`, and diagnostics for invalid,
|
|
94
|
+
ungroundable, unreadable, or over-limit candidates before approving a plan.
|
|
54
95
|
|
|
55
96
|
Kibi may author tracked Markdown/YAML/manifests and relationship shards
|
|
56
97
|
transactionally, but never Git-stages or commits them. Never read or edit
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# Bootstrap resource
|
|
2
2
|
|
|
3
|
-
`kb_plan_bootstrap` is read-only and returns `kibi.bootstrap-plan.v1`.
|
|
3
|
+
`kb_plan_bootstrap` is read-only and returns `kibi.bootstrap-plan.v1`. Declared
|
|
4
|
+
`knowledgeSources` and cited `intentClaims` are part of `declaredContext` and
|
|
5
|
+
therefore of the plan hash; a candidate built from a claim has `sourceKind:
|
|
6
|
+
intent_claim` and evidence rows `intent_claim:<sourceId>:<reference>`,
|
|
7
|
+
`knowledge_source:<kind>:<locator>`, and `source_authority:<authority>`. Its
|
|
8
|
+
requirement keeps the citation as `text_ref: <sourceId>:<reference>`. Review
|
|
4
9
|
candidate evidence, exact actions, dependencies, expected snapshots, source
|
|
5
10
|
hashes, bounded questions, diagnostics, and the canonical `planHash` before
|
|
6
11
|
approving. A preview does not authorize source edits. After approval, pass the
|
|
@@ -9,3 +14,9 @@ approved hash; inspect its typed result
|
|
|
9
14
|
and follow `nextActions` if it returns `committed_with_repairs`. Direct
|
|
10
15
|
`kb_upsert` is forbidden for every bootstrap task; never manually replay the
|
|
11
16
|
plan through it.
|
|
17
|
+
|
|
18
|
+
`BOOTSTRAP_PLAN_INVALID` fails before bootstrap writes or a new journal; request
|
|
19
|
+
a corrected plan. `BOOTSTRAP_PLAN_REJECTED` reports a deterministic failure and
|
|
20
|
+
may include earlier committed `data.actionResults`. Re-plan from the current
|
|
21
|
+
state; its terminal journal cannot recover. Review candidate suppressions and
|
|
22
|
+
cited authoring follow-ups, including any `over_limit` entries, before approval.
|