kibi-cursor 0.5.0 → 0.6.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 +85 -0
- package/README.md +16 -1
- package/agent-plugin/mcp.json +10 -0
- package/agent-plugin/plugin.json +11 -0
- package/agent-plugin/skills/init-kibi/SKILL.md +62 -0
- package/agent-plugin/skills/kibi-freshness/SKILL.md +44 -0
- package/agent-plugin/skills/kibi-traceability/SKILL.md +60 -0
- package/agent-plugin/skills/kibi-usage/SKILL.md +276 -0
- package/agent-plugin/skills/kibi-usage/resources/fact-lanes.md +235 -0
- package/agent-plugin/skills/kibi-usage/resources/logic-ir.md +43 -0
- package/agent-plugin/skills/kibi-usage/resources/operation-access.md +44 -0
- package/agent-plugin/skills/kibi-usage/resources/relationship-directions.md +119 -0
- package/agent-plugin/skills/kibi-usage/resources/ui-requirements.md +96 -0
- package/agent-plugin/skills/kibi-usage/resources/workflows.md +97 -0
- package/dist/.cursor-plugin/plugin.json +1 -1
- package/dist/messages.d.ts +2 -2
- package/dist/messages.js +2 -2
- package/dist/skills/.canon-hash.json +7 -5
- package/dist/skills/kibi-traceability/SKILL.md +7 -1
- package/dist/skills/kibi-usage/SKILL.md +44 -12
- package/dist/skills/kibi-usage/resources/fact-lanes.md +12 -2
- package/dist/skills/kibi-usage/resources/logic-ir.md +43 -0
- package/dist/skills/kibi-usage/resources/operation-access.md +19 -19
- package/dist/skills/kibi-usage/resources/ui-requirements.md +96 -0
- package/dist/skills/kibi-usage/resources/workflows.md +40 -8
- package/package.json +3 -2
- package/skills/.canon-hash.json +7 -5
- package/skills/kibi-traceability/SKILL.md +7 -1
- package/skills/kibi-usage/SKILL.md +44 -12
- package/skills/kibi-usage/resources/fact-lanes.md +12 -2
- package/skills/kibi-usage/resources/logic-ir.md +43 -0
- package/skills/kibi-usage/resources/operation-access.md +19 -19
- package/skills/kibi-usage/resources/ui-requirements.md +96 -0
- package/skills/kibi-usage/resources/workflows.md +40 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kibi-cursor",
|
|
3
3
|
"displayName": "Kibi",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"description": "Optional Cursor adapter for Kibi. Requires SWI-Prolog 9+ and project-local kibi-cli, kibi-mcp, and kibi-core 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,90 @@
|
|
|
1
1
|
# kibi-cursor
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Coverage reports now distinguish structural linkage from a conservative end-to-end requirement proof. Users can see exactly which semantic, contradiction, scenario, E2E, symbol, or source-coordinate stage prevents proof, together with ranked repair guidance; executable test symbols also stop inflating production-coverage counts. Structured proposition ledgers and refreshed symbol coordinates now survive sync as queryable proof evidence.
|
|
8
|
+
|
|
9
|
+
Current requirement ingestion now fails closed when assertive prose is missing from its ledger, drifts from its source hash or byte spans, duplicates an identity, or claims a modeled representation without exactly one same-key grounding fact. Markdown projects receive a compatibility baseline before new or semantically edited requirements are held to the contract, and explicit unresolved states remain usable without being misreported as consistency.
|
|
10
|
+
|
|
11
|
+
Proof-bearing tests now keep append-only execution receipts tied to the current deterministic workspace snapshot. Coverage and status expose that snapshot through CLI and MCP, and missing, stale, failed, malformed, mismatched, future-dated, or unavailable evidence can no longer inherit authority from a durable `passing` label.
|
|
12
|
+
|
|
13
|
+
Requirement coverage now turns proof gaps into a deterministic read-only migration plan. Users can work one validated dependency batch at a time, see when pagination makes a plan incomplete, and avoid applying downstream links or receipts before their semantic and graph prerequisites exist.
|
|
14
|
+
|
|
15
|
+
Diagnostic usage evidence now drives a versioned workflow acceptance report. Users can enforce fresh advisor, validation, source-lookup, proof-recovery, receipt, and mutation-retry evidence from the CLI, while unfiltered CLI/MCP checks surface ranked project-local repairs without treating missing or stale telemetry as a pass.
|
|
16
|
+
|
|
17
|
+
Distribution audits now compare the same six requirement-compiler behaviors across source, freshly packed CLI/MCP packages, and the binaries actually resolved by dogfood or pinned projects. Unsupported legacy capabilities remain explicit non-matches, executable provenance is inspected directly, and every project divergence needs a named upgrade or compatibility action.
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
|
|
21
|
+
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.
|
|
22
|
+
|
|
23
|
+
- Add the shared `kibi.requirement-proof.v2` Prolog evaluator and expose its rows, fresh receipt evidence, and summary counts through CLI and MCP coverage.
|
|
24
|
+
- Persist generated symbol coordinates and symbol metadata into normal and staged RDF projections.
|
|
25
|
+
- Preserve semantic-inventory JSON through mutation, sync, RDF storage, and query round trips, and refresh coordinates before extracting their manifest overlay.
|
|
26
|
+
- Render proof state and proof gaps in the CLI coverage table, and classify symbol traceability roles explicitly.
|
|
27
|
+
- Document the proof contract and update the bundled traceability skill to use proof outcomes instead of structural counts as its success boundary.
|
|
28
|
+
- Add the versioned `kibi.semantic-inventory.v1` boundary to CLI/MCP preflight, upsert, modeling plans, and Markdown sync, with packed-package E2E coverage.
|
|
29
|
+
- Preserve JSON Schema `const` values through MCP's Zod adapter so source and packed tool contracts enforce and advertise the same inventory version.
|
|
30
|
+
- Add append-only `kibi.verification-receipt.v1` validation, RDF/Markdown persistence, snapshot-bound freshness checks, explicit repair gaps, and CLI/MCP workspace-snapshot parity.
|
|
31
|
+
- Discover project-local predicate schemas from normalized RDF, withhold write plans for unbound ordered arguments, and accept exact `schemaId`, `argumentBindings`, and reviewed `polarityHint` inputs for conservative completion without lexical guessing.
|
|
32
|
+
- Attach source-bound strict, predicate, and rule witnesses to contradiction diagnostics, preserving unresolved rule overlap as incomplete analysis in requirement proof.
|
|
33
|
+
- Add `kibi.repair-plan.v1` to requirement coverage with stable plan IDs, per-requirement dependency batches, pagination fail-closed behavior, validation workflows, and non-auto-applicable sequential mutation policy across CLI and MCP.
|
|
34
|
+
- Add `kibi.telemetry-acceptance.v1`, exact mutation fingerprints, coverage recovery/receipt event fields, the `usage-metrics --require-acceptance` gate, and telemetry-backed full-check quality diagnostics.
|
|
35
|
+
- Add `kibi.distribution-parity.v1`, executable-derived runtime provenance, stable semantic normalization, action-bound project divergences, and packed/project-resolved E2E fixtures for the six requirement-compiler capabilities.
|
|
36
|
+
- Add CLI JSON diagnostic logging, opaque session/actor correlation, and the deterministic read-only `kibi.telemetry-remediation.v1` report and command.
|
|
37
|
+
- Add `kibi.legacy-migration-plan.v1` to CLI and MCP coverage with fail-closed source binding, exact proposition inventories, schema-provenance ranking, deterministic pagination, and packed read-only E2E coverage. Requirement-only `semantic_text` now carries authored prose independently from `text_ref` evidence, and semantic source drift blocks review application.
|
|
38
|
+
|
|
39
|
+
## 0.5.1
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- 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.
|
|
44
|
+
|
|
45
|
+
- Reframe `kibi-usage` Interface Selection and the operation-access preference column to peer surfaces.
|
|
46
|
+
- Update OpenCode prompt injection, enforcement, and init-kibi guidance.
|
|
47
|
+
- Update the MCP init-kibi prompt and the staged-impact evidence resolution text.
|
|
48
|
+
- Re-sync the Cursor and Codex skill bundles.
|
|
49
|
+
|
|
50
|
+
- 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.
|
|
51
|
+
|
|
52
|
+
- Synchronize the Logic IR, fact-lane, workflow, and portable skill guidance into both agent bundles.
|
|
53
|
+
- Keep the bundled skill manifests and canonical hashes aligned with the CLI public skill.
|
|
54
|
+
|
|
55
|
+
- 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.
|
|
56
|
+
|
|
57
|
+
- Add a committed portable Agent Plugin artifact at `agent-plugin/` with a conformant `plugin.json` manifest (plugin.schema.json 1.0.0).
|
|
58
|
+
- Generate the artifact's `mcp.json` with the required `$schema` and `stdio` server type.
|
|
59
|
+
- List the Agent Plugin (`plugins/kibi-agent-plugin`) in the repo marketplace alongside `kibi-cursor`.
|
|
60
|
+
- Add `scripts/build-agent-plugin.ts` to regenerate the artifact and keep its skills in sync with the canonical bundle.
|
|
61
|
+
|
|
62
|
+
- 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.
|
|
63
|
+
|
|
64
|
+
- Remove repository-specific release and optimizer-corpus text from `kibi-usage`.
|
|
65
|
+
- Add portable clause-complete prose-to-ground-predicate/property guidance and examples.
|
|
66
|
+
- Preserve logical claim and predicate-schema fields through Markdown sync.
|
|
67
|
+
- Add semantic-advisor clause inventories, merged claim manifests, and the `logic-coverage` check.
|
|
68
|
+
- Enable manifest validation by default and report every current unmanifested requirement as explicit backfill debt.
|
|
69
|
+
- Detect exact `assert`/`deny` conflicts over the same ground predicate.
|
|
70
|
+
- Normalize trailing clause punctuation so formatting variants share one claim identity.
|
|
71
|
+
- Enforce a one-claim/one-ground-fact mapping and reject duplicate logical terms masquerading as separate coverage.
|
|
72
|
+
- Preserve every target when exact query results contain repeated relationship types.
|
|
73
|
+
- Keep semantic-advisor readiness partial until every normative claim has a distinct logical grounding slot.
|
|
74
|
+
- Drain machine-readable CLI output before the explicit process exit so large results are complete without leaving runtime handles alive.
|
|
75
|
+
- Preserve and enforce claim-key patterns, uniqueness, and paired provenance through MCP schema registration.
|
|
76
|
+
- Synchronize the corrected skill into the Codex and Cursor bundles.
|
|
77
|
+
|
|
78
|
+
- 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.
|
|
79
|
+
|
|
80
|
+
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.
|
|
81
|
+
|
|
82
|
+
- Add `docs/ui-requirements.md` with the three-layer UI modeling guide, payload-shaped examples, and the check workflow.
|
|
83
|
+
- Point the modeling cheatsheet decision tree, agent LLM rules, and the AGENTS quick references at the new UI lane.
|
|
84
|
+
- 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.
|
|
85
|
+
- Synchronize the updated `kibi-usage` skill into the Codex and Cursor bundles.
|
|
86
|
+
- Keep compound Prolog goals out of the one-shot query cache so `kb_status` reports fresh state after same-session writes.
|
|
87
|
+
|
|
3
88
|
## 0.5.0
|
|
4
89
|
|
|
5
90
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ Add this plugin only after the base packages work in your project.
|
|
|
31
31
|
|
|
32
32
|
### Cursor Marketplace (recommended)
|
|
33
33
|
|
|
34
|
-
Submit or install from the Kibi repository marketplace at `.cursor-plugin/marketplace.json`, which points at `./plugins/kibi-cursor
|
|
34
|
+
Submit or install from the Kibi repository marketplace at `.cursor-plugin/marketplace.json`, which points at `./plugins/kibi-cursor` (Cursor Plugin) and `./plugins/kibi-agent-plugin` (portable Agent Plugin). Cursor detects the format from the plugin manifest, so both install from the same marketplace.
|
|
35
35
|
|
|
36
36
|
For local testing before marketplace publication, copy a real directory tree into Cursor's user-plugins folder. Symlinks are rejected when the target lives outside `plugins/local` (common on WSL):
|
|
37
37
|
|
|
@@ -83,6 +83,21 @@ Manual MCP fallback (no plugin install required):
|
|
|
83
83
|
}
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
## Portable Agent Plugin (Agent Plugins standard)
|
|
87
|
+
|
|
88
|
+
`kibi-cursor` also ships a portable [Agent Plugins](https://agent-plugins.org) build at `agent-plugin/`. The Agent Plugins open standard (v1.0.0) packages Agent Skills and MCP servers for any compatible client — Cursor, Copilot, OpenCode, and others — so the same Kibi capabilities load without client-specific adaptation.
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
agent-plugin/
|
|
92
|
+
├── plugin.json # agent-plugins.org/schemas/1.0.0/plugin.schema.json
|
|
93
|
+
├── skills/ # canonical Kibi Agent Skills (kibi-usage, init-kibi, ...)
|
|
94
|
+
└── mcp.json # agent-plugins.org/schemas/1.0.0/mcp.schema.json (stdio kibi-mcp)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- Cursor loads the portable build directly; Cursor-only components (rules, commands, hooks) remain in the `.cursor-plugin` Cursor Plugin build.
|
|
98
|
+
- Both formats are listed in the same marketplace; pick the format your client needs.
|
|
99
|
+
- The portable build still requires the project-local `kibi-cli`, `kibi-mcp`, and `kibi-core` packages plus SWI-Prolog 9+ (see Prerequisites above).
|
|
100
|
+
|
|
86
101
|
## Features
|
|
87
102
|
|
|
88
103
|
### Discovery-first rules and skills
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
|
+
"name": "kibi",
|
|
4
|
+
"version": "0.6.0",
|
|
5
|
+
"description": "Repo-local, per-branch, queryable knowledge base. Portable Agent Plugin packaging Kibi's Agent Skills and MCP server.",
|
|
6
|
+
"author": { "name": "Kibi" },
|
|
7
|
+
"homepage": "https://github.com/Looted/kibi/blob/develop/docs/install.md",
|
|
8
|
+
"repository": "https://github.com/Looted/kibi.git",
|
|
9
|
+
"license": "AGPL-3.0-or-later",
|
|
10
|
+
"keywords": ["kibi", "mcp", "knowledge-base", "traceability", "swi-prolog"]
|
|
11
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: init-kibi
|
|
3
|
+
name: init-kibi
|
|
4
|
+
description: Bootstrap and model knowledge safely using approved Kibi MCP initialization and mutation workflow.
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
kibiCompatibility: "*"
|
|
7
|
+
tags:
|
|
8
|
+
- kibi
|
|
9
|
+
- mcp
|
|
10
|
+
- bootstrap
|
|
11
|
+
- agent-guidance
|
|
12
|
+
---
|
|
13
|
+
## Goal
|
|
14
|
+
|
|
15
|
+
Set up or refresh Kibi knowledge for the current branch through approved Kibi interfaces only. Maintain source-file traceability for every repository-backed claim, and require explicit operator approval before any mutation.
|
|
16
|
+
|
|
17
|
+
## Interface Selection
|
|
18
|
+
|
|
19
|
+
1. If approved Kibi MCP tools are visible, use the MCP route.
|
|
20
|
+
2. Otherwise, in a trusted workspace, use the canonical project-local CLI fallback: `npx --no-install kibi ...` or `bunx --no-install kibi ...`.
|
|
21
|
+
3. If neither approved MCP tools nor the project-local CLI are available, stop and tell the operator to enable or install Kibi for this workspace.
|
|
22
|
+
4. Never use a global fallback, an installing runner, or any route outside the approved Kibi interface.
|
|
23
|
+
|
|
24
|
+
Use `kibi-usage/resources/operation-access.md` for the exact operation-to-route mapping. The CLI preview route accepts the same JSON object as `kb_autopilot_generate`:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
echo '{"maxCandidates":25,"minConfidence":0.8}' | npx --no-install kibi autopilot-generate --input -
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Capability Workflow
|
|
31
|
+
|
|
32
|
+
- Generate a read-only bootstrap preview with `kb_autopilot_generate`, or the dedicated CLI route `autopilot-generate --input`.
|
|
33
|
+
- Show the generated preview and obtain explicit approval before writes.
|
|
34
|
+
- Apply reviewed entity creation or updates with `kb_upsert`, or `upsert --input`.
|
|
35
|
+
- If cleanup is needed, use `kb_delete`, or `delete --input`, only after checking dependencies and obtaining approval for the specific removal.
|
|
36
|
+
- Finish with `kb_check`, or `check --input`, to validate the branch snapshot.
|
|
37
|
+
|
|
38
|
+
## Guidance
|
|
39
|
+
|
|
40
|
+
- Keep mutation requests explicit, small, and sequential.
|
|
41
|
+
- Prefer source-linked entities so future `kb_query` lookups can verify repository context against source files.
|
|
42
|
+
- Preserve traceability by linking facts, claims, scenarios, and tests to concrete project files whenever repository evidence supports it.
|
|
43
|
+
- Do not read or edit files inside `.kb` directly; all changes go through the selected Kibi interface.
|
|
44
|
+
- Ask at most four bounded context questions, and only when repository evidence is insufficient.
|
|
45
|
+
- Stop at the documented operator repair boundary if the setup appears partial, inconsistent, or unsupported by the approved interface.
|
|
46
|
+
|
|
47
|
+
## Public Training Trajectories
|
|
48
|
+
|
|
49
|
+
- `init-kibi-bootstrap-analysis-train-1`: Analyze the cold-start repository and produce a read-only bootstrap preview using only the public Kibi MCP surface.
|
|
50
|
+
- `init-kibi-bootstrap-analysis-train-2`: Analyze the cold-start repository and produce a read-only bootstrap preview using only the public Kibi MCP surface.
|
|
51
|
+
- `init-kibi-bounded-context-questions-train-1`: Ask only the bounded context questions needed before bootstrap synthesis using only the public Kibi MCP surface.
|
|
52
|
+
- `init-kibi-bounded-context-questions-train-2`: Ask only the bounded context questions needed before bootstrap synthesis using only the public Kibi MCP surface.
|
|
53
|
+
- `init-kibi-approval-sequential-writes-train-1`: Apply the approved bootstrap plan sequentially and finish with validation using only the public Kibi MCP surface.
|
|
54
|
+
- `init-kibi-approval-sequential-writes-train-2`: Apply the approved bootstrap plan sequentially and finish with validation using only the public Kibi MCP surface.
|
|
55
|
+
- `init-kibi-repair-escalation-train-1`: Identify the partial setup and stop at the documented operator repair boundary using only the public Kibi MCP surface.
|
|
56
|
+
- `init-kibi-repair-escalation-train-2`: Identify the partial setup and stop at the documented operator repair boundary using only the public Kibi MCP surface.
|
|
57
|
+
|
|
58
|
+
## Training Data
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
[{"taskId":"init-kibi-bootstrap-analysis-train-1","family":"bootstrap-analysis","reflection":"Analyze the cold-start repository and produce a read-only bootstrap preview. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"init-kibi-bootstrap-analysis-train-2","family":"bootstrap-analysis","reflection":"Analyze the cold-start repository and produce a read-only bootstrap preview. This is train case 2; use only the public Kibi MCP surface."},{"taskId":"init-kibi-bounded-context-questions-train-1","family":"bounded-context-questions","reflection":"Ask only the bounded context questions needed before bootstrap synthesis. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"init-kibi-bounded-context-questions-train-2","family":"bounded-context-questions","reflection":"Ask only the bounded context questions needed before bootstrap synthesis. This is train case 2; use only the public Kibi MCP surface."},{"taskId":"init-kibi-approval-sequential-writes-train-1","family":"approval-sequential-writes","reflection":"Apply the approved bootstrap plan sequentially and finish with validation. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"init-kibi-approval-sequential-writes-train-2","family":"approval-sequential-writes","reflection":"Apply the approved bootstrap plan sequentially and finish with validation. This is train case 2; use only the public Kibi MCP surface."},{"taskId":"init-kibi-repair-escalation-train-1","family":"repair-escalation","reflection":"Identify the partial setup and stop at the documented operator repair boundary. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"init-kibi-repair-escalation-train-2","family":"repair-escalation","reflection":"Identify the partial setup and stop at the documented operator repair boundary. This is train case 2; use only the public Kibi MCP surface."}]
|
|
62
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: kibi-freshness
|
|
3
|
+
name: kibi-freshness
|
|
4
|
+
description: Check branch freshness and source linkage quality before decisions or risky writes.
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
kibiCompatibility: "*"
|
|
7
|
+
tags:
|
|
8
|
+
- kibi
|
|
9
|
+
- mcp
|
|
10
|
+
- freshness
|
|
11
|
+
- agent-guidance
|
|
12
|
+
---
|
|
13
|
+
## Goal
|
|
14
|
+
|
|
15
|
+
Help agents decide whether Kibi knowledge is current enough to support safe changes while preserving source-file traceability and approved interface boundaries.
|
|
16
|
+
|
|
17
|
+
## Interface Selection
|
|
18
|
+
|
|
19
|
+
1. If Kibi MCP tools are visible and approved for the workspace, use the MCP surface only.
|
|
20
|
+
2. Otherwise, in a trusted workspace, use the canonical project-local CLI fallback through `npx --no-install kibi ...` or `bunx --no-install kibi ...`.
|
|
21
|
+
3. If the project-local CLI is unavailable or too old, stop and tell the operator to enable or install Kibi.
|
|
22
|
+
4. Never use a global fallback or an installing runner.
|
|
23
|
+
|
|
24
|
+
Use `kibi-usage/resources/operation-access.md` for exact dedicated routes. A project-local CLI freshness check is executable as:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
echo '{}' | npx --no-install kibi status --input -
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Capability Workflow
|
|
31
|
+
|
|
32
|
+
- Use `kb_status`, or `status --input`, first to confirm branch attachment, freshness state, dirty-worktree evidence, and whether the knowledge snapshot is safe to rely on.
|
|
33
|
+
- Use `kb_query`, or `query --input`, with `sourceFile` and text references for source-linked discovery.
|
|
34
|
+
- Re-run `kb_search`, or `search --input`, after sync gaps or stale context are detected.
|
|
35
|
+
- If knowledge must change, use the selected interface's `kb_upsert`/`upsert` or `kb_delete`/`delete` operation sequentially, then finish with `kb_check`/`check`.
|
|
36
|
+
|
|
37
|
+
## Guidance
|
|
38
|
+
|
|
39
|
+
- Prefer the public Kibi MCP surface whenever it is available and approved.
|
|
40
|
+
- Never proceed with broad changes when freshness is stale and unresolved.
|
|
41
|
+
- If entities look stale, refresh context through an approved Kibi capability and then re-query.
|
|
42
|
+
- Preserve source-file traceability by carrying `sourceFile`, text references, and validation evidence through discovery, mutation, and completion.
|
|
43
|
+
- Do not read or edit files inside `.kb` directly; use the selected Kibi interface instead.
|
|
44
|
+
- Completion must state one freshness outcome: KB updated, no KB impact with rationale, or deferred/failed.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: kibi-traceability
|
|
3
|
+
name: kibi-traceability
|
|
4
|
+
description: Maintain requirement, scenario, and test traceability through Kibi MCP tools.
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
kibiCompatibility: "*"
|
|
7
|
+
tags:
|
|
8
|
+
- kibi
|
|
9
|
+
- mcp
|
|
10
|
+
- traceability
|
|
11
|
+
- agent-guidance
|
|
12
|
+
---
|
|
13
|
+
## Goal
|
|
14
|
+
|
|
15
|
+
Validate and strengthen requirement, scenario, test, behavioral-symbol, and source-file traceability before and after code changes.
|
|
16
|
+
|
|
17
|
+
## Interface Selection
|
|
18
|
+
|
|
19
|
+
1. If Kibi MCP tools are visible and approved, use the MCP surface as the primary authority.
|
|
20
|
+
2. Otherwise, in a trusted workspace, use the canonical project-local CLI fallback through `npx --no-install kibi ...` or `bunx --no-install kibi ...`.
|
|
21
|
+
3. If neither approved MCP tools nor the project-local CLI are available, or if the CLI is unavailable or too old, stop and tell the operator to enable or install Kibi.
|
|
22
|
+
4. Never use a global fallback or an installing runner.
|
|
23
|
+
|
|
24
|
+
Use MCP routes for modeling, querying, checking, validation, and cleanup. Use the project-local CLI only as the fallback interface, passing JSON input through stdin. Example:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
echo '{"sourceFiles":["src/auth/login.ts"],"includeImpactDiagnostics":true,"includeWorkingTreeDiff":true}' | npx --no-install kibi check --input -
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Capability Workflow
|
|
31
|
+
|
|
32
|
+
- Locate requirements through `kb_search` or `search --input`, then inspect exact records through `kb_query` or `query --input`.
|
|
33
|
+
- Before meaningful edits, identify linked requirements, scenarios, tests, facts, source files, and behavioral symbols relevant to the planned change.
|
|
34
|
+
- After meaningful source edits, run `kb_check({sourceFiles:[...], includeImpactDiagnostics:true, includeWorkingTreeDiff:true})` or the equivalent `check --input` JSON recipe before deciding whether traceability is current.
|
|
35
|
+
- Apply traceability updates sequentially through `kb_upsert` or `upsert --input` for requirements, scenarios, tests, facts, behavioral symbols, and source-linked relationships.
|
|
36
|
+
- Validate constraints and consistency through `kb_check` or `check --input` after updates.
|
|
37
|
+
- Run `kb_coverage` by requirement after validation. Treat `coverageStatus` as structural compatibility only; use the separate `proofStatus`, `proofStages`, `proofGaps`, and ranked `proofRepairs` to decide whether the complete intent-to-code chain is proven.
|
|
38
|
+
- Use `kb_delete` or `delete --input` only for explicit cleanup of obsolete records or relationships.
|
|
39
|
+
|
|
40
|
+
## Guidance
|
|
41
|
+
|
|
42
|
+
- Prefer source-linked relationships so requirements, scenarios, tests, symbols, and files can be traced cleanly.
|
|
43
|
+
- Preserve source-file traceability whenever adding or changing requirements, scenarios, tests, facts, behavioral symbols, or implementation links.
|
|
44
|
+
- Preserve the canonical chain `REQ-* -> SCEN-* -> TEST-*` when adding or changing requirements.
|
|
45
|
+
- Production symbols should implement requirements; test symbols should remain executable evidence for tests.
|
|
46
|
+
- A proof-bearing test must be reached through the requirement's scenario, declare `verification_scope: end_to_end`, and carry a fresh passed `kibi.verification-receipt.v1` bound to the live `verificationSnapshot`. Link its executable code with `executable_for`; link each production symbol with `implements` and `covered_by` to that qualifying test. Durable `status: passing` is structural metadata, not execution proof.
|
|
47
|
+
- Read `kb_status` immediately before a proof-bearing run, execute the exact recorded command, then append—not replace—the receipt history with test ID, scope, runner, command, snapshot, environment hash, timestamps, outcome, and artifact digest. Re-read coverage; wrong-snapshot, stale, failed, malformed, future-dated, or unavailable evidence must remain a gap.
|
|
48
|
+
- A green structural count is not proof. Do not report success while a proposition is absent or unresolved, grounding is incomplete or non-bijective, contradiction analysis is incomplete, the E2E path is direct-only, its execution receipt is not fresh for the live snapshot, or proof-bearing symbols lack current generated coordinates.
|
|
49
|
+
- Use `kb_coverage.repairPlan` to turn row-local `proofRepairs` into small dependency-ordered batches. Require `scope.complete: true` before treating it as a project-wide inventory, apply only `state: ready` work, and treat every `autoApplicable: false` batch as reviewed guidance rather than an executable mutation payload. Query current endpoints, follow its validation policy, keep upserts sequential, then rerun coverage after each batch; newly visible downstream gaps supersede the older plan. Never reinterpret `no_conflict_found` as universal consistency; it only describes the modeled ground claims Kibi could inspect.
|
|
50
|
+
- When `.kb/usage.log` exists, run `kibi usage-metrics --format json --require-acceptance` after the final complete coverage call. A successful graph check does not override failed or insufficient `kibi.telemetry-acceptance.v1` evidence; follow ranked telemetry diagnostics for advisor/preflight bypasses, lookup misses, stalled proof recovery, receipt freshness, or repeated mutation failures.
|
|
51
|
+
- Resolve impact at behavioral-symbol granularity when Kibi reports symbol-level diagnostics; avoid treating a whole file as impacted when the report identifies narrower linked behavior.
|
|
52
|
+
- Treat `symbol_semantic_review_needed` as a prompt to inspect linked requirements and tests; Kibi reports graph links but does not prove prose semantics.
|
|
53
|
+
- Do not read or edit files inside `.kb` directly; all modeling and cleanup goes through the selected Kibi interface.
|
|
54
|
+
- Keep approval boundaries intact: only use Kibi MCP tools that are visible and approved, and only use the project-local CLI fallback in a trusted workspace.
|
|
55
|
+
|
|
56
|
+
Public training trajectories:
|
|
57
|
+
[{"taskId":"kibi-traceability-requirement-discovery-train-1","family":"requirement-discovery","reflection":"Discover the requirement linked to the supplied source symbol. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"kibi-traceability-requirement-discovery-train-2","family":"requirement-discovery","reflection":"Discover the requirement linked to the supplied source symbol. This is train case 2; use only the public Kibi MCP surface."},{"taskId":"kibi-traceability-symbol-impact-granularity-train-1","family":"symbol-impact-granularity","reflection":"Resolve impact at behavioral symbol granularity rather than file granularity. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"kibi-traceability-symbol-impact-granularity-train-2","family":"symbol-impact-granularity","reflection":"Resolve impact at behavioral symbol granularity rather than file granularity. This is train case 2; use only the public Kibi MCP surface."},{"taskId":"kibi-traceability-relationship-chain-train-1","family":"relationship-chain","reflection":"Trace the requirement, scenario, and test relationship chain. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"kibi-traceability-relationship-chain-train-2","family":"relationship-chain","reflection":"Trace the requirement, scenario, and test relationship chain. This is train case 2; use only the public Kibi MCP surface."},{"taskId":"kibi-traceability-executable-coverage-train-1","family":"executable-coverage","reflection":"Establish executable test identity and behavioral coverage links. This is train case 1; use only the public Kibi MCP surface."},{"taskId":"kibi-traceability-executable-coverage-train-2","family":"executable-coverage","reflection":"Establish executable test identity and behavioral coverage links. This is train case 2; use only the public Kibi MCP surface."}]
|
|
58
|
+
|
|
59
|
+
Previous development gate:
|
|
60
|
+
{"mean":0,"hardPasses":0,"worstFamilyMean":0}
|