kibi-cursor 0.6.0 → 1.0.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.
Files changed (92) hide show
  1. package/.cursor-plugin/plugin.json +1 -1
  2. package/CHANGELOG.md +171 -0
  3. package/README.md +13 -10
  4. package/agent-plugin/plugin.json +1 -1
  5. package/agent-plugin/skills/kibi-bootstrap/SKILL.md +58 -0
  6. package/agent-plugin/skills/kibi-bootstrap/resources/bootstrap.md +11 -0
  7. package/agent-plugin/skills/kibi-bootstrap/resources/branch-lifecycle.md +7 -0
  8. package/agent-plugin/skills/kibi-bootstrap/resources/operation-access.md +5 -0
  9. package/agent-plugin/skills/kibi-bootstrap/resources/source-authoring.md +8 -0
  10. package/agent-plugin/skills/kibi-freshness/SKILL.md +40 -10
  11. package/agent-plugin/skills/kibi-freshness/resources/branch-lifecycle.md +7 -0
  12. package/agent-plugin/skills/kibi-freshness/resources/operation-access.md +6 -0
  13. package/agent-plugin/skills/kibi-freshness/resources/source-authoring.md +7 -0
  14. package/agent-plugin/skills/kibi-traceability/SKILL.md +47 -47
  15. package/agent-plugin/skills/kibi-traceability/resources/branch-lifecycle.md +7 -0
  16. package/agent-plugin/skills/kibi-traceability/resources/operation-access.md +5 -0
  17. package/agent-plugin/skills/kibi-traceability/resources/source-authoring.md +6 -0
  18. package/agent-plugin/skills/kibi-traceability/resources/traceability.md +8 -0
  19. package/agent-plugin/skills/kibi-usage/SKILL.md +115 -239
  20. package/agent-plugin/skills/kibi-usage/resources/branch-lifecycle.md +31 -0
  21. package/agent-plugin/skills/kibi-usage/resources/kb-improvement.md +38 -0
  22. package/agent-plugin/skills/kibi-usage/resources/operation-access.md +36 -38
  23. package/agent-plugin/skills/kibi-usage/resources/relationship-directions.md +3 -3
  24. package/agent-plugin/skills/kibi-usage/resources/source-authoring.md +31 -0
  25. package/agent-plugin/skills/kibi-usage/resources/workflows.md +56 -3
  26. package/bin/launch-kibi-mcp.d.mts +18 -0
  27. package/bin/launch-kibi-mcp.mjs +378 -0
  28. package/commands/kibi-bootstrap.md +19 -0
  29. package/dist/.cursor-plugin/plugin.json +1 -1
  30. package/dist/bin/launch-kibi-mcp.d.mts +18 -0
  31. package/dist/bin/launch-kibi-mcp.mjs +378 -0
  32. package/dist/commands/kibi-bootstrap.md +19 -0
  33. package/dist/hook-input.d.ts +2 -0
  34. package/dist/hook-input.js +10 -0
  35. package/dist/hook-runner.js +34 -12
  36. package/dist/hook-state-storage.js +3 -0
  37. package/dist/hook-state.d.ts +2 -0
  38. package/dist/hook-state.js +3 -0
  39. package/dist/mcp.json +2 -2
  40. package/dist/messages.js +6 -1
  41. package/dist/path-policy.js +43 -1
  42. package/dist/skills/.canon-hash.json +21 -7
  43. package/dist/skills/kibi-bootstrap/SKILL.md +58 -0
  44. package/dist/skills/kibi-bootstrap/resources/bootstrap.md +11 -0
  45. package/dist/skills/kibi-bootstrap/resources/branch-lifecycle.md +7 -0
  46. package/dist/skills/kibi-bootstrap/resources/operation-access.md +5 -0
  47. package/dist/skills/kibi-bootstrap/resources/source-authoring.md +8 -0
  48. package/dist/skills/kibi-freshness/SKILL.md +40 -10
  49. package/dist/skills/kibi-freshness/resources/branch-lifecycle.md +7 -0
  50. package/dist/skills/kibi-freshness/resources/operation-access.md +6 -0
  51. package/dist/skills/kibi-freshness/resources/source-authoring.md +7 -0
  52. package/dist/skills/kibi-traceability/SKILL.md +47 -47
  53. package/dist/skills/kibi-traceability/resources/branch-lifecycle.md +7 -0
  54. package/dist/skills/kibi-traceability/resources/operation-access.md +5 -0
  55. package/dist/skills/kibi-traceability/resources/source-authoring.md +6 -0
  56. package/dist/skills/kibi-traceability/resources/traceability.md +8 -0
  57. package/dist/skills/kibi-usage/SKILL.md +115 -239
  58. package/dist/skills/kibi-usage/resources/branch-lifecycle.md +31 -0
  59. package/dist/skills/kibi-usage/resources/kb-improvement.md +38 -0
  60. package/dist/skills/kibi-usage/resources/operation-access.md +36 -38
  61. package/dist/skills/kibi-usage/resources/relationship-directions.md +3 -3
  62. package/dist/skills/kibi-usage/resources/source-authoring.md +31 -0
  63. package/dist/skills/kibi-usage/resources/workflows.md +56 -3
  64. package/mcp.json +2 -2
  65. package/package.json +4 -3
  66. package/skills/.canon-hash.json +21 -7
  67. package/skills/kibi-bootstrap/SKILL.md +58 -0
  68. package/skills/kibi-bootstrap/resources/bootstrap.md +11 -0
  69. package/skills/kibi-bootstrap/resources/branch-lifecycle.md +7 -0
  70. package/skills/kibi-bootstrap/resources/operation-access.md +5 -0
  71. package/skills/kibi-bootstrap/resources/source-authoring.md +8 -0
  72. package/skills/kibi-freshness/SKILL.md +40 -10
  73. package/skills/kibi-freshness/resources/branch-lifecycle.md +7 -0
  74. package/skills/kibi-freshness/resources/operation-access.md +6 -0
  75. package/skills/kibi-freshness/resources/source-authoring.md +7 -0
  76. package/skills/kibi-traceability/SKILL.md +47 -47
  77. package/skills/kibi-traceability/resources/branch-lifecycle.md +7 -0
  78. package/skills/kibi-traceability/resources/operation-access.md +5 -0
  79. package/skills/kibi-traceability/resources/source-authoring.md +6 -0
  80. package/skills/kibi-traceability/resources/traceability.md +8 -0
  81. package/skills/kibi-usage/SKILL.md +115 -239
  82. package/skills/kibi-usage/resources/branch-lifecycle.md +31 -0
  83. package/skills/kibi-usage/resources/kb-improvement.md +38 -0
  84. package/skills/kibi-usage/resources/operation-access.md +36 -38
  85. package/skills/kibi-usage/resources/relationship-directions.md +3 -3
  86. package/skills/kibi-usage/resources/source-authoring.md +31 -0
  87. package/skills/kibi-usage/resources/workflows.md +56 -3
  88. package/agent-plugin/skills/init-kibi/SKILL.md +0 -62
  89. package/commands/init-kibi.md +0 -21
  90. package/dist/commands/init-kibi.md +0 -21
  91. package/dist/skills/init-kibi/SKILL.md +0 -62
  92. package/skills/init-kibi/SKILL.md +0 -62
@@ -0,0 +1,31 @@
1
+ # Source-first authoring
2
+
3
+ Tracked Markdown, YAML, symbol manifests, and relationship shards are the
4
+ authoritative project memory. Prolog/RDF state is a rebuildable compiled
5
+ artifact. Kibi may transactionally write tracked files, but it never stages or
6
+ commits them; ordinary Git workflows remain responsible for review and merge.
7
+
8
+ `kb_upsert` accepts `document.path` and `document.body`. Existing entities use
9
+ their authored source by default and preserve body bytes when `body` is omitted.
10
+ New requirements use `semantic_text` as their body. If a new entity has zero or
11
+ multiple configured writable targets, provide an explicit workspace-relative
12
+ `document.path`; absolute, traversal, and symlink escapes are rejected.
13
+
14
+ New files are compiled only while their exact bytes are covered by a pending-
15
+ source receipt. Sync compiles Git-tracked files plus those hash-bound pending
16
+ files; arbitrary untracked files are ignored. Stage the file in Git to absorb
17
+ and remove its receipt. A changed or missing pending file is a blocking hash
18
+ drift diagnostic. Unresolved Git index conflicts are likewise blocking; Kibi
19
+ never chooses a merge winner.
20
+
21
+ Relationship upserts and relationship deletes patch only the canonical shard,
22
+ preserving unrelated records. Authored entity deletion returns a hash-bound
23
+ plan; approve that plan through `kb_apply_plan`. Evolve requirements with a new
24
+ requirement and `supersedes`, rather than deleting the old semantic claim.
25
+
26
+ On `committed_with_repairs`, inspect `effects` and execute the typed required
27
+ `nextActions`. Never retry the original mutation after its authoritative commit.
28
+ Cancellation follows the same rule: wait for the terminal journal state. A
29
+ pre-commit rollback is retryable, a committed source with a failed derivative
30
+ is repairable, and an indeterminate outcome is non-retryable until its recovery
31
+ action resolves the journal.
@@ -1,5 +1,38 @@
1
1
  # Workflows
2
2
 
3
+ ## Closeout contract
4
+
5
+ End every task with these five independent fields (not a single inferred
6
+ success flag):
7
+
8
+ ```text
9
+ taskOutcome: complete | interim | blocked
10
+ kbState: clean_fresh | stale | dirty | legacy_compat | not_evaluated
11
+ verificationState: fresh | dirty | unavailable | not_evaluated
12
+ proofState: proven | mixed | unresolved | not_evaluated
13
+ limitationDisposition: none | accepted | unaccepted | not_applicable
14
+ ```
15
+
16
+ `taskOutcome` describes whether the requested objective was completed. The
17
+ other fields describe observed system state. A clean check can coexist with a
18
+ stale or dirty KB; unresolved proof can coexist with a complete maintenance
19
+ task. An accepted limitation is an auditable operator decision, never logical
20
+ grounding, receipt editing, or proof. For every quality diagnostic, record its
21
+ ID, one of `fixed`, `accepted`, or `deferred`, and a rationale. Keep accepted
22
+ ontology gaps and historical telemetry limitations explicit.
23
+
24
+ Receipt reuse is safe only when the live verification snapshot, contract hash,
25
+ freshness window, and every required case result still match. Otherwise rerun
26
+ the contracted command. If the contract changed, retain every older receipt
27
+ unchanged, append evidence for the current contract, and keep proof unresolved
28
+ with `verification_contract_mismatch` until that current receipt exists.
29
+ Obsolete symbols require current extraction or Git evidence before
30
+ remap/deletion; transfer coverage only when existing test evidence supports it,
31
+ then sync and read back status. Same-version packages with different export
32
+ surfaces are a release defect: require a new package version and label any
33
+ project override temporary. This skill never selects a package manager or
34
+ edits dependency configuration.
35
+
3
36
  ## Discovery to Validation Sequence
4
37
 
5
38
  The canonical workflow for any KB operation follows this pattern:
@@ -13,7 +46,7 @@ The canonical workflow for any KB operation follows this pattern:
13
46
  7. **Create endpoints**: validated `kb_upsert` for new entities, sequentially
14
47
  8. **Link**: validated `kb_upsert` with `requires_rule`, `requires_predicate`, `constrains`, or `requires_property`, sequentially
15
48
  9. **Validate coverage and consistency**: targeted `rule-safety`, `rule-verifiability`, `semantic-completeness`, `logic-coverage`, `predicate-verifiability`, and `domain-contradictions`, then final full `kb_check`
16
- 10. **Prove execution**: read `kb_status.verificationSnapshot`, run each scenario-backed E2E command, append its `kibi.verification-receipt.v1`, and re-run `kb_coverage`; never promote durable test status into fresh evidence
49
+ 10. **Prove execution**: read `kb_status.verificationSnapshot`, run each scenario-backed E2E command exactly as declared by its `verification_contract.v1` through `kibi verify`, append the derived `kibi.verification-receipt.v2`, and re-run `kb_coverage`; never promote durable test status into fresh evidence
17
50
  11. **Repair incrementally**: require `kb_coverage.repairPlan.scope.complete`, apply only one `ready` dependency batch per requirement, validate before every sequential write, and rerun coverage before selecting the next batch
18
51
  12. **Gate workflow evidence**: when `.kb/usage.log` exists, run `kibi usage-metrics --format json --require-acceptance`; repair ranked telemetry diagnostics and never treat stale or insufficient evidence as a pass
19
52
 
@@ -23,6 +56,26 @@ Every current requirement without `logic_claims` remains visible as non-blocking
23
56
 
24
57
  `kibi.telemetry-acceptance.v1` evaluates the latest 200 usage events and keeps process health separate from graph correctness. It requires at least 95% complete diagnostic telemetry and, when applicable, exact recent validation before every upsert and a same-requirement/current-hash advisor pass before requirement writes. It also evaluates source lookup misses, comparable complete-scope proof-gap recovery, receipt-specific coverage gaps, and mutation targets retried three or more times. Failed metrics become ranked `category: telemetry` quality diagnostics; missing current coverage fields or evidence older than seven days stays `insufficient_evidence`.
25
58
 
59
+ ## Agent-guided migration
60
+
61
+ `kb_status`, unfiltered `kb_check`, and complete-scope `kb_coverage` may return
62
+ the shared `kibi.migration-plan.v2`. Treat it as a typed action graph: inspect
63
+ the canonical `planHash`, scope completeness, dependencies, safety class,
64
+ preconditions, postconditions, and evidence. Apply only ready automatic actions
65
+ with `autoApplicable: true` through an explicitly approved `kb_apply_plan` or
66
+ `kibi migrate --apply-safe` request containing the exact hash and action IDs.
67
+ Never infer an operation from a prose suggestion, and never apply a partial
68
+ plan's destructive symbol or relationship action.
69
+
70
+ The migration engine may normalize schema/config metadata, cut over validated
71
+ legacy storage with backups, migrate the exact historical branch attachment,
72
+ refresh coordinates, and perform provenance-proven stale cleanup. It does not
73
+ choose package managers, ground semantic claims, resolve contradictions, rerun
74
+ E2E tests, rewrite receipt history, remap authored symbols, or accept
75
+ limitations. Those actions remain explicit review/operator/execution steps.
76
+
77
+ For `e2e_receipt_freshness_low`, query each listed requirement/test gap and run its exact current contract through `kibi verify`; this appends v2 evidence and preserves older history. If `coverage_depth_review` conflicts with a coverage row whose `proofStages.passingE2e.status` is `passed`, report the diagnostic as a stale heuristic and keep any independent proof gaps unresolved.
78
+
26
79
  ## Creating a New Feature
27
80
  ```
28
81
  1. kb_search to discover existing requirements and related knowledge
@@ -50,10 +103,10 @@ Do not create a test-fact pair. Facts describe invariants; requirements or scena
50
103
  1. Confirm the exact `REQ -> SCEN -> TEST` path and require typed `verification_scope: end_to_end`; direct requirement-to-test links do not satisfy the conservative scenario stage.
51
104
  2. Read `kb_status` and retain its available `verificationSnapshot`. Stop if the runtime reports `unknown`; proof must fail closed when the code identity cannot be computed.
52
105
  3. Run the exact E2E command against that snapshot. Record runner, command, start/finish timestamps, outcome, an environment SHA-256, and an artifact/output SHA-256. Do not mint a passed receipt from an authored test status or from an unexecuted assertion.
53
- 4. Preserve every existing receipt byte-for-byte and append a unique `kibi.verification-receipt.v1` object with strictly later `finished_at`. Mutation and incremental sync reject history removal, rewriting, and reordering.
106
+ 4. Preserve every existing receipt byte-for-byte and append the derived `kibi.verification-receipt.v2` object with strictly later `finished_at`. Earlier receipts may bind older contracts; they remain audit history but cannot prove the current contract. Mutation and incremental sync reject history removal, rewriting, and reordering.
54
107
  5. Re-read `kb_status`; if the snapshot changed during the run, discard the candidate as proof and rerun against the new snapshot. Then run `kb_coverage` and inspect `proofStages.passingE2e.receiptEvidence` plus gap codes.
55
108
 
56
- Only the newest receipt for the live snapshot qualifies, and it must be passed, no more than seven days old, and no more than five minutes in the future. Wrong-snapshot history is retained but stale for current proof. `missing_verification_receipt`, `stale_verification_receipt`, `failed_verification_receipt`, `invalid_verification_receipt`, and `verification_snapshot_unavailable` are repair states, not warnings to waive.
109
+ Only the newest receipt matching both the live snapshot and current contract qualifies, and it must be passed, no more than seven days old, and no more than five minutes in the future. Wrong-snapshot and older-contract history is retained but cannot prove the current test. `missing_verification_receipt`, `stale_verification_receipt`, `failed_verification_receipt`, `invalid_verification_receipt`, `verification_contract_mismatch`, and `verification_snapshot_unavailable` are repair states, not warnings to waive.
57
110
 
58
111
  ## Predicate-First Requirement Modeling
59
112
 
@@ -1,62 +0,0 @@
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
- ```
@@ -1,21 +0,0 @@
1
- ---
2
- name: init-kibi
3
- description: Bootstrap Kibi knowledge for the current branch using the MCP autopilot workflow
4
- ---
5
-
6
- # Initialize Kibi
7
-
8
- Bootstrap repo-local Kibi memory without editing `.kb/` files directly.
9
-
10
- ## Workflow
11
-
12
- 1. Run `kb_autopilot_generate` for read-only synthesis.
13
- 2. Show the preview and get explicit approval before writes.
14
- 3. Apply approved entities with sequential `kb_upsert`.
15
- 4. Finish with `kb_check`.
16
-
17
- ## Guidance
18
-
19
- - Ask at most four bounded context questions when repository evidence is insufficient.
20
- - Prefer source-linked entities so future `kb_query` lookups can verify context.
21
- - Keep mutation batches small and reviewable.
@@ -1,21 +0,0 @@
1
- ---
2
- name: init-kibi
3
- description: Bootstrap Kibi knowledge for the current branch using the MCP autopilot workflow
4
- ---
5
-
6
- # Initialize Kibi
7
-
8
- Bootstrap repo-local Kibi memory without editing `.kb/` files directly.
9
-
10
- ## Workflow
11
-
12
- 1. Run `kb_autopilot_generate` for read-only synthesis.
13
- 2. Show the preview and get explicit approval before writes.
14
- 3. Apply approved entities with sequential `kb_upsert`.
15
- 4. Finish with `kb_check`.
16
-
17
- ## Guidance
18
-
19
- - Ask at most four bounded context questions when repository evidence is insufficient.
20
- - Prefer source-linked entities so future `kb_query` lookups can verify context.
21
- - Keep mutation batches small and reviewable.
@@ -1,62 +0,0 @@
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
- ```
@@ -1,62 +0,0 @@
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
- ```