kibi-cursor 0.2.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.
@@ -0,0 +1,31 @@
1
+ {
2
+ "version": 1,
3
+ "hooks": {
4
+ "sessionStart": [
5
+ {
6
+ "command": "node dist/hook-runner.js"
7
+ }
8
+ ],
9
+ "preToolUse": [
10
+ {
11
+ "command": "node dist/hook-runner.js"
12
+ }
13
+ ],
14
+ "postToolUse": [
15
+ {
16
+ "command": "node dist/hook-runner.js"
17
+ }
18
+ ],
19
+ "beforeReadFile": [
20
+ {
21
+ "command": "node dist/hook-runner.js"
22
+ }
23
+ ],
24
+ "stop": [
25
+ {
26
+ "command": "node dist/hook-runner.js",
27
+ "loop_limit": 1
28
+ }
29
+ ]
30
+ }
31
+ }
package/mcp.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "kibi": {
4
+ "command": "npx",
5
+ "args": ["--no-install", "kibi-mcp"]
6
+ }
7
+ }
8
+ }
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "kibi-cursor",
3
+ "version": "0.2.0",
4
+ "description": "Kibi Cursor plugin - thin adapter for Cursor MCP integration and editor hooks",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ ".cursor-plugin",
17
+ "mcp.json",
18
+ "hooks",
19
+ "skills",
20
+ "rules",
21
+ "commands",
22
+ "dist",
23
+ "CHANGELOG.md"
24
+ ],
25
+ "engines": {
26
+ "node": ">=18"
27
+ },
28
+ "license": "AGPL-3.0-or-later",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/Looted/kibi.git"
32
+ },
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
36
+ "scripts": {
37
+ "build": "tsc -p tsconfig.json && bun run scripts/copy-plugin-assets.ts",
38
+ "dev": "tsc -p tsconfig.json --watch",
39
+ "clean": "rm -rf dist",
40
+ "prepack": "npm run build"
41
+ },
42
+ "peerDependencies": {
43
+ "kibi-cli": ">=0.12.0 <1",
44
+ "kibi-mcp": ">=0.12.0 <1"
45
+ },
46
+ "peerDependenciesMeta": {
47
+ "kibi-cli": {
48
+ "optional": true
49
+ },
50
+ "kibi-mcp": {
51
+ "optional": true
52
+ }
53
+ },
54
+ "devDependencies": {
55
+ "@types/node": "latest",
56
+ "typescript": "^5.7.0"
57
+ }
58
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ description: Requirement traceability and symbol linking through Kibi
3
+ globs:
4
+ - "**/*.{ts,tsx,js,jsx,py,go,rs,java}"
5
+ alwaysApply: false
6
+ ---
7
+
8
+ Before changing production code, discover linked requirements with `kb_search` and `kb_query(sourceFile=...)`.
9
+
10
+ Preserve the canonical chain `REQ-* -> SCEN-* -> TEST-*` when modeling behavior.
11
+
12
+ Prefer symbol manifest + `executable_for` for test/e2e code. Inline `// implements REQ-xxx` remains acceptable for quick code-only changes.
13
+
14
+ Route durable domain facts to strict `fact` entities. Use `fact_kind: observation` or `meta` for bugs and workarounds, not `flag`.
@@ -0,0 +1,19 @@
1
+ ---
2
+ description: Kibi MCP discovery-first workflow and KB mutation discipline
3
+ alwaysApply: true
4
+ ---
5
+
6
+ Use Kibi via MCP tools only. Do not manually read or edit `.kb/` files.
7
+
8
+ Discovery workflow:
9
+ - Start with `kb_search` for broad discovery.
10
+ - Follow with `kb_query` for exact entities, filters, and source-linked lookups.
11
+ - Use `kb_status`, `kb_find_gaps`, `kb_coverage`, and `kb_graph` when reporting questions need them.
12
+
13
+ Mutation workflow:
14
+ - Query before mutate.
15
+ - Create relationship endpoints before linking.
16
+ - Use `kb_upsert` sequentially, then `kb_check`.
17
+ - Use `kb_delete` only for intentional removals with dependency awareness.
18
+
19
+ Completion must state KB freshness outcome: updated, no-impact with rationale, or deferred/failed.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: init-kibi
3
+ description: Bootstrap and model knowledge safely using approved Kibi MCP initialization and mutation workflow.
4
+ ---
5
+
6
+ ## Goal
7
+
8
+ Set up or refresh Kibi knowledge for the current branch without manual filesystem edits.
9
+
10
+ ## MCP workflow
11
+
12
+ - Run `kb_autopilot_generate` for suggested initial facts and claims.
13
+ - Show the generated preview and get explicit approval before writes.
14
+ - Use `kb_upsert` for reviewed entity creation or updates.
15
+ - If cleanup is needed, use `kb_delete` only after checking dependencies.
16
+ - Finish with `kb_check` to validate the branch snapshot.
17
+
18
+ ## Guidance
19
+
20
+ - Keep mutation requests explicit and small.
21
+ - Use source-linked entities where possible so future `kb_query` lookups can verify context.
22
+ - Do not edit `.kb/**` files directly; all changes go through MCP calls.
23
+ - Ask at most four bounded context questions, and only when repository evidence is insufficient.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: kibi-freshness
3
+ description: Check branch freshness and source linkage quality before decisions or risky writes.
4
+ ---
5
+
6
+ ## Goal
7
+
8
+ Help agents decide whether KB context is current enough to support safe changes.
9
+
10
+ ## MCP workflow
11
+
12
+ - Use `kb_status` first to confirm branch attachment and freshness state.
13
+ - Use `kb_query` with `sourceFile`/text refs for source-linked discovery.
14
+ - Re-run `kb_search` after sync gaps are detected.
15
+ - If knowledge must change, update it with `kb_upsert` or `kb_delete` and finish with `kb_check`.
16
+
17
+ ## Guidance
18
+
19
+ - Never proceed with broad changes when freshness is stale and unresolved.
20
+ - If entities look stale, prefer refreshing context via MCP flows and then re-query.
21
+ - Avoid direct `.kb` editing; use `kb_status` and other MCP checks instead.
22
+ - Completion must state one freshness outcome: KB updated, no KB impact with rationale, or deferred/failed.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: kibi-traceability
3
+ description: Maintain requirement, scenario, and test traceability through Kibi MCP tools.
4
+ ---
5
+
6
+ ## Goal
7
+
8
+ Validate and strengthen traceability before and after code changes.
9
+
10
+ ## MCP workflow
11
+
12
+ - Locate requirements with `kb_search` and inspect exact details with `kb_query`.
13
+ - Apply updates with `kb_upsert` for requirements, scenarios, tests, or facts.
14
+ - Validate constraints and consistency with `kb_check`.
15
+
16
+ ## Guidance
17
+
18
+ - Prefer source-linked relationships so symbols and files can be traced back cleanly.
19
+ - Include `kb_query` and `kb_delete` only when explicit cleanups are required.
20
+ - Never directly edit `.kb/**`; all modeling and cleanup goes through MCP tools.
21
+ - Preserve the canonical chain `REQ-* -> SCEN-* -> TEST-*` when adding or changing requirements.
22
+ - Production symbols should implement requirements; test symbols should remain executable evidence for tests.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: kibi-usage
3
+ description: Use Kibi MCP discovery tools to find relevant requirements and context before editing code.
4
+ ---
5
+
6
+ ## Goal
7
+
8
+ Help an agent discover existing knowledge in Kibi before making changes.
9
+
10
+ ## MCP workflow
11
+
12
+ - Start with `kb_search` using domain keywords and requirement intent.
13
+ - Move to `kb_query` for exact entity retrieval by `id` or `type`.
14
+ - Use `kb_status` when context is stale or branch linkage is unclear.
15
+ - Use curated reports only when the question needs them: `kb_find_gaps`, `kb_coverage`, or `kb_graph`.
16
+ - Mutate only through `kb_upsert` or `kb_delete`, then validate with `kb_check`.
17
+
18
+ ## Guidance
19
+
20
+ - Prefer source-linked lookups and traceability-aware retrieval via `kb_query` filters.
21
+ - Never open or patch files under `.kb/` directly.
22
+ - When unsure about scope, re-run `kb_search` with tighter terms, then validate with `kb_query`.
23
+ - Report the KB outcome before completion: updated, no-impact with rationale, or deferred/failed.