kibi-cli 2.4.0 → 2.5.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 (352) hide show
  1. package/dist/cli-json-command.d.ts +6 -0
  2. package/dist/cli-json-command.d.ts.map +1 -1
  3. package/dist/cli-json-command.js +37 -9
  4. package/dist/cli-operation-loader.d.ts.map +1 -1
  5. package/dist/cli-operation-loader.js +7 -0
  6. package/dist/cli-operation-metadata.d.ts +12 -4
  7. package/dist/cli-operation-metadata.d.ts.map +1 -1
  8. package/dist/cli-operation-metadata.js +14 -4
  9. package/dist/cli-protocol.d.ts +14 -0
  10. package/dist/cli-protocol.d.ts.map +1 -1
  11. package/dist/cli-protocol.js +31 -2
  12. package/dist/cli-register-proof.d.ts.map +1 -1
  13. package/dist/cli-register-proof.js +13 -0
  14. package/dist/commands/check.d.ts.map +1 -1
  15. package/dist/commands/check.js +11 -2
  16. package/dist/commands/discovery-shared.d.ts.map +1 -1
  17. package/dist/commands/discovery-shared.js +8 -2
  18. package/dist/commands/engine.d.ts.map +1 -1
  19. package/dist/commands/engine.js +4 -2
  20. package/dist/commands/gc.d.ts.map +1 -1
  21. package/dist/commands/gc.js +7 -0
  22. package/dist/commands/init-helpers.d.ts.map +1 -1
  23. package/dist/commands/init-helpers.js +0 -1
  24. package/dist/commands/migrate.d.ts.map +1 -1
  25. package/dist/commands/migrate.js +281 -14
  26. package/dist/commands/proof-compact.d.ts +9 -0
  27. package/dist/commands/proof-compact.d.ts.map +1 -0
  28. package/dist/commands/proof-compact.js +58 -0
  29. package/dist/commands/prove.d.ts +38 -0
  30. package/dist/commands/prove.d.ts.map +1 -1
  31. package/dist/commands/prove.js +222 -47
  32. package/dist/commands/sync/persistence.d.ts.map +1 -1
  33. package/dist/commands/sync/persistence.js +61 -16
  34. package/dist/commands/sync.d.ts +8 -0
  35. package/dist/commands/sync.d.ts.map +1 -1
  36. package/dist/commands/sync.js +42 -16
  37. package/dist/diagnostics.js +1 -1
  38. package/dist/engine-limits.d.ts +74 -0
  39. package/dist/engine-limits.d.ts.map +1 -0
  40. package/dist/engine-limits.js +201 -0
  41. package/dist/engine.d.ts +10 -0
  42. package/dist/engine.d.ts.map +1 -1
  43. package/dist/engine.js +57 -9
  44. package/dist/extractors/manifest.d.ts +8 -0
  45. package/dist/extractors/manifest.d.ts.map +1 -1
  46. package/dist/extractors/manifest.js +34 -5
  47. package/dist/extractors/markdown.d.ts +8 -0
  48. package/dist/extractors/markdown.d.ts.map +1 -1
  49. package/dist/extractors/markdown.js +57 -0
  50. package/dist/extractors/relationships.d.ts.map +1 -1
  51. package/dist/extractors/relationships.js +2 -0
  52. package/dist/intent-search.d.ts +4 -1
  53. package/dist/intent-search.d.ts.map +1 -1
  54. package/dist/intent-search.js +186 -33
  55. package/dist/operations/bootstrap/candidate-helpers.d.ts.map +1 -1
  56. package/dist/operations/bootstrap/candidate-helpers.js +8 -1
  57. package/dist/operations/bootstrap/candidates.d.ts.map +1 -1
  58. package/dist/operations/bootstrap/candidates.js +54 -38
  59. package/dist/operations/bootstrap/generate.d.ts +2 -0
  60. package/dist/operations/bootstrap/generate.d.ts.map +1 -1
  61. package/dist/operations/bootstrap/generate.js +87 -33
  62. package/dist/operations/bootstrap/intent-claims.d.ts.map +1 -1
  63. package/dist/operations/bootstrap/intent-claims.js +12 -4
  64. package/dist/operations/bootstrap/markdown-candidates.d.ts +2 -0
  65. package/dist/operations/bootstrap/markdown-candidates.d.ts.map +1 -1
  66. package/dist/operations/bootstrap/markdown-candidates.js +32 -10
  67. package/dist/operations/bootstrap/presentation.d.ts.map +1 -1
  68. package/dist/operations/bootstrap/presentation.js +6 -2
  69. package/dist/operations/bootstrap/requirement-claims.d.ts +1 -0
  70. package/dist/operations/bootstrap/requirement-claims.d.ts.map +1 -1
  71. package/dist/operations/bootstrap/requirement-claims.js +13 -1
  72. package/dist/operations/bootstrap/validation.d.ts +4 -0
  73. package/dist/operations/bootstrap/validation.d.ts.map +1 -0
  74. package/dist/operations/bootstrap/validation.js +20 -0
  75. package/dist/operations/migration/inventory-rederive.d.ts +81 -0
  76. package/dist/operations/migration/inventory-rederive.d.ts.map +1 -0
  77. package/dist/operations/migration/inventory-rederive.js +484 -0
  78. package/dist/operations/migration/kb-sources.d.ts +53 -0
  79. package/dist/operations/migration/kb-sources.d.ts.map +1 -0
  80. package/dist/operations/migration/kb-sources.js +233 -0
  81. package/dist/operations/migration/origin-backfill.d.ts +39 -0
  82. package/dist/operations/migration/origin-backfill.d.ts.map +1 -0
  83. package/dist/operations/migration/origin-backfill.js +164 -0
  84. package/dist/operations/migration/polarity-values.d.ts +10 -0
  85. package/dist/operations/migration/polarity-values.d.ts.map +1 -0
  86. package/dist/operations/migration/polarity-values.js +60 -0
  87. package/dist/operations/migration/schema6.d.ts +59 -0
  88. package/dist/operations/migration/schema6.d.ts.map +1 -0
  89. package/dist/operations/migration/schema6.js +379 -0
  90. package/dist/operations/migration/source-paths.d.ts +131 -0
  91. package/dist/operations/migration/source-paths.d.ts.map +1 -0
  92. package/dist/operations/migration/source-paths.js +308 -0
  93. package/dist/operations/migration/superseded-closure.d.ts +54 -0
  94. package/dist/operations/migration/superseded-closure.d.ts.map +1 -0
  95. package/dist/operations/migration/superseded-closure.js +187 -0
  96. package/dist/operations/modeling/logic-modeling.d.ts.map +1 -1
  97. package/dist/operations/modeling/logic-modeling.js +3 -5
  98. package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
  99. package/dist/operations/modeling/model-requirement.js +225 -67
  100. package/dist/operations/mutation/contradictions.d.ts +16 -0
  101. package/dist/operations/mutation/contradictions.d.ts.map +1 -1
  102. package/dist/operations/mutation/contradictions.js +32 -0
  103. package/dist/operations/mutation/delete.d.ts.map +1 -1
  104. package/dist/operations/mutation/delete.js +15 -7
  105. package/dist/operations/mutation/origin.d.ts +21 -0
  106. package/dist/operations/mutation/origin.d.ts.map +1 -0
  107. package/dist/operations/mutation/origin.js +78 -0
  108. package/dist/operations/mutation/plan-apply-journal.d.ts +182 -0
  109. package/dist/operations/mutation/plan-apply-journal.d.ts.map +1 -0
  110. package/dist/operations/mutation/plan-apply-journal.js +613 -0
  111. package/dist/operations/mutation/predicate-vocabulary-guard.d.ts +3 -1
  112. package/dist/operations/mutation/predicate-vocabulary-guard.d.ts.map +1 -1
  113. package/dist/operations/mutation/predicate-vocabulary-guard.js +13 -2
  114. package/dist/operations/mutation/relationships.d.ts +5 -5
  115. package/dist/operations/mutation/relationships.d.ts.map +1 -1
  116. package/dist/operations/mutation/relationships.js +31 -11
  117. package/dist/operations/mutation/serialization.d.ts.map +1 -1
  118. package/dist/operations/mutation/serialization.js +3 -1
  119. package/dist/operations/mutation/source-authoring.d.ts +6 -0
  120. package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
  121. package/dist/operations/mutation/source-authoring.js +7 -1
  122. package/dist/operations/mutation/types.d.ts +14 -0
  123. package/dist/operations/mutation/types.d.ts.map +1 -1
  124. package/dist/operations/mutation/upsert.d.ts +30 -3
  125. package/dist/operations/mutation/upsert.d.ts.map +1 -1
  126. package/dist/operations/mutation/upsert.js +105 -35
  127. package/dist/operations/mutation/validate-upsert.d.ts +6 -0
  128. package/dist/operations/mutation/validate-upsert.d.ts.map +1 -1
  129. package/dist/operations/mutation/validate-upsert.js +34 -30
  130. package/dist/operations/planning/apply-plan.d.ts.map +1 -1
  131. package/dist/operations/planning/apply-plan.js +751 -144
  132. package/dist/operations/planning/compile-intent.d.ts +34 -1
  133. package/dist/operations/planning/compile-intent.d.ts.map +1 -1
  134. package/dist/operations/planning/compile-intent.js +314 -98
  135. package/dist/operations/proof/code-scope.d.ts +28 -0
  136. package/dist/operations/proof/code-scope.d.ts.map +1 -1
  137. package/dist/operations/proof/code-scope.js +72 -0
  138. package/dist/operations/proof/compact-receipts.d.ts +49 -0
  139. package/dist/operations/proof/compact-receipts.d.ts.map +1 -0
  140. package/dist/operations/proof/compact-receipts.js +160 -0
  141. package/dist/operations/proof/ingest-proof.d.ts +2 -0
  142. package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
  143. package/dist/operations/proof/ingest-proof.js +44 -23
  144. package/dist/operations/proof/prune-receipts.d.ts.map +1 -1
  145. package/dist/operations/proof/prune-receipts.js +5 -9
  146. package/dist/operations/proof/receipt-compaction.d.ts +48 -0
  147. package/dist/operations/proof/receipt-compaction.d.ts.map +1 -0
  148. package/dist/operations/proof/receipt-compaction.js +121 -0
  149. package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -1
  150. package/dist/operations/semantic-advisor/analysis-receipt.js +12 -1
  151. package/dist/operations/semantic-advisor/analyze-prose.d.ts +2 -1
  152. package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
  153. package/dist/operations/semantic-advisor/analyze-prose.js +51 -5
  154. package/dist/operations/semantic-advisor/clauses.d.ts +1 -0
  155. package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -1
  156. package/dist/operations/semantic-advisor/clauses.js +11 -1
  157. package/dist/operations/semantic-advisor/conditional-rules.d.ts +33 -0
  158. package/dist/operations/semantic-advisor/conditional-rules.d.ts.map +1 -0
  159. package/dist/operations/semantic-advisor/conditional-rules.js +262 -0
  160. package/dist/operations/semantic-advisor/ingestion-boundary.d.ts +3 -1
  161. package/dist/operations/semantic-advisor/ingestion-boundary.d.ts.map +1 -1
  162. package/dist/operations/semantic-advisor/ingestion-boundary.js +14 -6
  163. package/dist/operations/semantic-advisor/plugin-orchestration.js +1 -1
  164. package/dist/prolog/codec.d.ts.map +1 -1
  165. package/dist/prolog/codec.js +2 -1
  166. package/dist/prolog.d.ts +9 -0
  167. package/dist/prolog.d.ts.map +1 -1
  168. package/dist/prolog.js +56 -10
  169. package/dist/proof/command-test-report.d.ts +74 -0
  170. package/dist/proof/command-test-report.d.ts.map +1 -0
  171. package/dist/proof/command-test-report.js +206 -0
  172. package/dist/public/branch-resolver.d.ts +1 -0
  173. package/dist/public/branch-resolver.d.ts.map +1 -1
  174. package/dist/public/branch-resolver.js +1 -0
  175. package/dist/public/entity-origin.d.ts +69 -0
  176. package/dist/public/entity-origin.d.ts.map +1 -0
  177. package/dist/public/entity-origin.js +142 -0
  178. package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
  179. package/dist/public/impact/full-kb-quality.js +1 -0
  180. package/dist/public/impact/requirement-quality.js +1 -1
  181. package/dist/public/operations/catalog.d.ts +130 -19
  182. package/dist/public/operations/catalog.d.ts.map +1 -1
  183. package/dist/public/operations/catalog.js +3 -0
  184. package/dist/public/operations/check-executor.d.ts.map +1 -1
  185. package/dist/public/operations/check-executor.js +8 -0
  186. package/dist/public/operations/contracts.d.ts +0 -5
  187. package/dist/public/operations/contracts.d.ts.map +1 -1
  188. package/dist/public/operations/contracts.js +63 -14
  189. package/dist/public/operations/discovery-entities.d.ts +15 -0
  190. package/dist/public/operations/discovery-entities.d.ts.map +1 -1
  191. package/dist/public/operations/discovery-entities.js +59 -0
  192. package/dist/public/operations/discovery-executors.d.ts +6 -1
  193. package/dist/public/operations/discovery-executors.d.ts.map +1 -1
  194. package/dist/public/operations/discovery-executors.js +65 -6
  195. package/dist/public/operations/index.d.ts +1 -0
  196. package/dist/public/operations/index.d.ts.map +1 -1
  197. package/dist/public/operations/index.js +1 -0
  198. package/dist/public/operations/migration-plan.d.ts +5 -0
  199. package/dist/public/operations/migration-plan.d.ts.map +1 -1
  200. package/dist/public/operations/migration-plan.js +26 -1
  201. package/dist/public/operations/node-ports.d.ts.map +1 -1
  202. package/dist/public/operations/node-ports.js +24 -3
  203. package/dist/public/operations/origin-review.d.ts +51 -0
  204. package/dist/public/operations/origin-review.d.ts.map +1 -0
  205. package/dist/public/operations/origin-review.js +307 -0
  206. package/dist/public/operations/predicate-schema-conformance.js +1 -1
  207. package/dist/public/operations/repair-plan.d.ts.map +1 -1
  208. package/dist/public/operations/repair-plan.js +4 -0
  209. package/dist/public/operations/result-envelope.d.ts.map +1 -1
  210. package/dist/public/operations/result-envelope.js +17 -5
  211. package/dist/public/operations/runtime-types.d.ts +9 -0
  212. package/dist/public/operations/runtime-types.d.ts.map +1 -1
  213. package/dist/public/operations/schema6-check-actions.d.ts +127 -0
  214. package/dist/public/operations/schema6-check-actions.d.ts.map +1 -0
  215. package/dist/public/operations/schema6-check-actions.js +575 -0
  216. package/dist/public/operations/source-path-dangling.d.ts +17 -0
  217. package/dist/public/operations/source-path-dangling.d.ts.map +1 -0
  218. package/dist/public/operations/source-path-dangling.js +66 -0
  219. package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
  220. package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
  221. package/dist/public/operations/specs/check-rules.generated.js +15 -1
  222. package/dist/public/operations/specs/check.d.ts +2 -2
  223. package/dist/public/operations/specs/check.js +1 -1
  224. package/dist/public/operations/specs/composite.d.ts +351 -0
  225. package/dist/public/operations/specs/composite.d.ts.map +1 -0
  226. package/dist/public/operations/specs/composite.js +96 -0
  227. package/dist/public/operations/specs/discovery.d.ts +8 -3
  228. package/dist/public/operations/specs/discovery.d.ts.map +1 -1
  229. package/dist/public/operations/specs/discovery.js +8 -3
  230. package/dist/public/operations/specs/modeling.d.ts +2 -2
  231. package/dist/public/operations/specs/modeling.js +2 -2
  232. package/dist/public/operations/specs/mutation-schemas.d.ts +73 -8
  233. package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
  234. package/dist/public/operations/specs/mutation-schemas.js +43 -7
  235. package/dist/public/operations/specs/mutation.d.ts +1 -1
  236. package/dist/public/operations/specs/mutation.js +1 -1
  237. package/dist/public/operations/specs/planning.d.ts +2 -2
  238. package/dist/public/operations/specs/planning.js +4 -4
  239. package/dist/public/operations/specs/reporting.d.ts.map +1 -1
  240. package/dist/public/operations/specs/reporting.js +13 -26
  241. package/dist/public/operations/specs/upsert.d.ts +79 -9
  242. package/dist/public/operations/specs/upsert.d.ts.map +1 -1
  243. package/dist/public/operations/specs/upsert.js +6 -1
  244. package/dist/public/operations/types.d.ts +1 -1
  245. package/dist/public/operations/types.d.ts.map +1 -1
  246. package/dist/public/proof-receipt.d.ts +1 -0
  247. package/dist/public/proof-receipt.d.ts.map +1 -1
  248. package/dist/public/schemas/entity.d.ts.map +1 -1
  249. package/dist/public/schemas/entity.js +52 -0
  250. package/dist/public/schemas/relationship.d.ts.map +1 -1
  251. package/dist/public/schemas/relationship.js +2 -0
  252. package/dist/public/skills/kibi-bootstrap/SKILL.md +6 -1
  253. package/dist/public/skills/kibi-bootstrap/resources/bootstrap.md +6 -0
  254. package/dist/public/skills/kibi-usage/SKILL.md +68 -18
  255. package/dist/public/skills/kibi-usage/resources/fact-lanes.md +5 -5
  256. package/dist/public/skills/kibi-usage/resources/kb-improvement.md +1 -1
  257. package/dist/public/skills/kibi-usage/resources/logic-ir.md +2 -2
  258. package/dist/public/skills/kibi-usage/resources/operation-access.md +25 -1
  259. package/dist/public/skills/kibi-usage/resources/ui-requirements.md +4 -4
  260. package/dist/public/skills/kibi-usage/resources/workflows.md +42 -25
  261. package/dist/public/telemetry-acceptance.d.ts +58 -2
  262. package/dist/public/telemetry-acceptance.d.ts.map +1 -1
  263. package/dist/public/telemetry-acceptance.js +136 -10
  264. package/dist/public/telemetry-remediation.d.ts.map +1 -1
  265. package/dist/public/telemetry-remediation.js +26 -10
  266. package/dist/relationships/shards.d.ts +13 -0
  267. package/dist/relationships/shards.d.ts.map +1 -1
  268. package/dist/relationships/shards.js +54 -28
  269. package/dist/runtime/cli-runtime.d.ts.map +1 -1
  270. package/dist/runtime/cli-runtime.js +44 -3
  271. package/dist/runtime/detached-snapshot.d.ts +38 -0
  272. package/dist/runtime/detached-snapshot.d.ts.map +1 -0
  273. package/dist/runtime/detached-snapshot.js +92 -0
  274. package/dist/schemas/entity.schema.json +122 -0
  275. package/dist/search-answer.d.ts +157 -0
  276. package/dist/search-answer.d.ts.map +1 -0
  277. package/dist/search-answer.js +846 -0
  278. package/dist/traceability/impact-knowledge.d.ts.map +1 -1
  279. package/dist/traceability/impact-knowledge.js +7 -0
  280. package/dist/traceability/symbol-extract.js +3 -3
  281. package/dist/traceability/temp-kb.d.ts.map +1 -1
  282. package/dist/traceability/temp-kb.js +12 -0
  283. package/dist/types/entities.d.ts +13 -0
  284. package/dist/types/entities.d.ts.map +1 -1
  285. package/dist/types/relationships.d.ts +1 -1
  286. package/dist/types/relationships.d.ts.map +1 -1
  287. package/dist/utils/branch-resolver.d.ts +37 -1
  288. package/dist/utils/branch-resolver.d.ts.map +1 -1
  289. package/dist/utils/branch-resolver.js +130 -3
  290. package/dist/utils/repo-relative-path.d.ts +18 -0
  291. package/dist/utils/repo-relative-path.d.ts.map +1 -0
  292. package/dist/utils/repo-relative-path.js +58 -0
  293. package/dist/utils/rule-registry.generated.d.ts +75 -3
  294. package/dist/utils/rule-registry.generated.d.ts.map +1 -1
  295. package/dist/utils/rule-registry.generated.js +89 -3
  296. package/dist/utils/schema-version.d.ts +1 -1
  297. package/dist/utils/schema-version.d.ts.map +1 -1
  298. package/dist/utils/schema-version.js +4 -3
  299. package/dist/utils/strict-modeling.d.ts +1 -1
  300. package/dist/utils/strict-modeling.d.ts.map +1 -1
  301. package/dist/utils/strict-modeling.js +23 -3
  302. package/package.json +3 -3
  303. package/schema/entities.pl +22 -0
  304. package/schema/relationships.pl +14 -0
  305. package/schema/validation.pl +45 -1
  306. package/src/public/branch-resolver.ts +1 -0
  307. package/src/public/entity-origin.ts +175 -0
  308. package/src/public/impact/full-kb-quality.ts +1 -0
  309. package/src/public/impact/requirement-quality.ts +1 -1
  310. package/src/public/operations/catalog.ts +3 -0
  311. package/src/public/operations/check-executor.ts +15 -0
  312. package/src/public/operations/contracts.ts +75 -15
  313. package/src/public/operations/discovery-entities.ts +74 -0
  314. package/src/public/operations/discovery-executors.ts +88 -10
  315. package/src/public/operations/index.ts +1 -0
  316. package/src/public/operations/migration-plan.ts +30 -1
  317. package/src/public/operations/node-ports.ts +24 -3
  318. package/src/public/operations/origin-review.ts +375 -0
  319. package/src/public/operations/predicate-schema-conformance.ts +1 -1
  320. package/src/public/operations/repair-plan.ts +4 -0
  321. package/src/public/operations/result-envelope.ts +18 -6
  322. package/src/public/operations/runtime-types.ts +9 -0
  323. package/src/public/operations/schema6-check-actions.ts +699 -0
  324. package/src/public/operations/source-path-dangling.ts +81 -0
  325. package/src/public/operations/specs/check-rules.generated.ts +15 -1
  326. package/src/public/operations/specs/check.ts +1 -1
  327. package/src/public/operations/specs/composite.ts +141 -0
  328. package/src/public/operations/specs/discovery.ts +9 -3
  329. package/src/public/operations/specs/modeling.ts +2 -2
  330. package/src/public/operations/specs/mutation-schemas.ts +49 -7
  331. package/src/public/operations/specs/mutation.ts +1 -1
  332. package/src/public/operations/specs/planning.ts +4 -4
  333. package/src/public/operations/specs/reporting.ts +13 -38
  334. package/src/public/operations/specs/upsert.ts +7 -1
  335. package/src/public/operations/types.ts +2 -0
  336. package/src/public/proof-receipt.ts +1 -0
  337. package/src/public/schemas/entity.ts +57 -0
  338. package/src/public/schemas/relationship.ts +2 -0
  339. package/src/public/skills/kibi-bootstrap/SKILL.md +6 -1
  340. package/src/public/skills/kibi-bootstrap/resources/bootstrap.md +6 -0
  341. package/src/public/skills/kibi-usage/SKILL.md +68 -18
  342. package/src/public/skills/kibi-usage/resources/fact-lanes.md +5 -5
  343. package/src/public/skills/kibi-usage/resources/kb-improvement.md +1 -1
  344. package/src/public/skills/kibi-usage/resources/logic-ir.md +2 -2
  345. package/src/public/skills/kibi-usage/resources/operation-access.md +25 -1
  346. package/src/public/skills/kibi-usage/resources/ui-requirements.md +4 -4
  347. package/src/public/skills/kibi-usage/resources/workflows.md +42 -25
  348. package/src/public/telemetry-acceptance-types.d.ts +4 -1
  349. package/src/public/telemetry-acceptance.ts +204 -10
  350. package/src/public/telemetry-remediation.ts +39 -10
  351. package/src/schemas/entity.schema.json +122 -0
  352. package/src/schemas/relationship.schema.json +2 -0
@@ -1 +1 @@
1
- {"version":3,"file":"upsert.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/upsert.ts"],"names":[],"mappings":"AAIA,OAAO,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CuC,CAAC"}
@@ -3,7 +3,7 @@ import { ENTITY_PROPERTIES_SCHEMA, ENTITY_TYPES, RELATIONSHIPS_SCHEMA, } from ".
3
3
  export const upsertSpec = {
4
4
  name: "kb_upsert",
5
5
  cliName: "upsert",
6
- description: "Create or update one entity and optional relationships. Use for KB mutations after validating intent; prefer kb_validate_upsert first because it returns semantic advisor receipts for prose-heavy requirements. Use kb_model_requirement before hand-writing strict property facts from prose, and kb_suggest_predicates before hand-writing ontology predicate facts. Use the `relationships` array for batch creation of multiple links in a single call (e.g., linking a requirement to multiple tests or facts). Prefer modeling requirements as reusable fact links (`constrains`, `requires_property`, or `requires_predicate`) so consistency and contradiction checks remain queryable. Relationship endpoints must already exist in KB. For requirements, the write will be rejected if it contradicts existing current requirements that constrain the same subject with incompatible properties. To replace a conflicting requirement, include a `supersedes` relationship from the new requirement to the old one in the same request. Successful writes may return non-blocking semantic advisor warnings; inspect and repair those warnings before treating prose as contradiction-checkable. Do not use for read-only inspection. Side effects: writes KB, may refresh symbol coordinates.",
6
+ description: "Create or update one entity and optional relationships. Use for KB mutations after validating intent; prefer a dryRun:true call first because it validates without writing and returns semantic advisor receipts for prose-heavy requirements. Use kb_model (mode requirement) before hand-writing strict property facts from prose, and kb_model (mode predicates) before hand-writing ontology predicate facts. Use the `relationships` array for batch creation of multiple links in a single call (e.g., linking a requirement to multiple tests or facts). Prefer modeling requirements as reusable fact links (`constrains`, `requires_property`, or `requires_predicate`) so consistency and contradiction checks remain queryable. Relationship endpoints must already exist in KB. For requirements, the write will be rejected if it contradicts existing current requirements that constrain the same subject with incompatible properties. To replace a conflicting requirement, include a `supersedes` relationship from the new requirement to the old one in the same request, then upsert the old requirement with status closed (kb_check blocks a superseded requirement that is not closed). Successful writes may return non-blocking semantic advisor warnings; inspect and repair those warnings before treating prose as contradiction-checkable. Do not use for read-only inspection. Side effects: writes KB, may refresh symbol coordinates; dryRun:true writes nothing.",
7
7
  businessInputSchema: {
8
8
  type: "object",
9
9
  required: ["type", "id", "properties"],
@@ -19,6 +19,11 @@ export const upsertSpec = {
19
19
  },
20
20
  properties: ENTITY_PROPERTIES_SCHEMA,
21
21
  relationships: RELATIONSHIPS_SCHEMA,
22
+ dryRun: {
23
+ type: "boolean",
24
+ default: false,
25
+ description: "Validate the payload and return schema/modeling errors, a normalized preview and the semantic advisor receipt without writing the KB or workspace. Use it as the preflight before the real write.",
26
+ },
22
27
  document: {
23
28
  type: "object",
24
29
  additionalProperties: false,
@@ -1,6 +1,6 @@
1
1
  import type { OperationContext } from "./runtime-types.js";
2
2
  export type { OperationContext };
3
- export type OperationName = "kb_query" | "kb_search" | "kb_status" | "kb_skills_list" | "kb_skills_load" | "kb_skills_read" | "kb_find_gaps" | "kb_coverage" | "kb_graph" | "kb_sparql_remote" | "kb_semantic_advisor" | "kb_upsert" | "kb_validate_upsert" | "kb_delete" | "kb_check" | "kb_prepare_impact_review" | "kb_model_requirement" | "kb_suggest_predicates" | "kb_plan_bootstrap" | "kb_compile_intent" | "kb_apply_plan" | "kb_ingest_proof";
3
+ export type OperationName = "kb_query" | "kb_search" | "kb_status" | "kb_skills_list" | "kb_skills_load" | "kb_skills_read" | "kb_skills" | "kb_find_gaps" | "kb_coverage" | "kb_graph" | "kb_sparql_remote" | "kb_semantic_advisor" | "kb_upsert" | "kb_validate_upsert" | "kb_delete" | "kb_check" | "kb_prepare_impact_review" | "kb_model_requirement" | "kb_suggest_predicates" | "kb_model" | "kb_plan_bootstrap" | "kb_compile_intent" | "kb_apply_plan" | "kb_ingest_proof";
4
4
  export type OperationEffect = "local-read" | "kb-read" | "workspace-read" | "network-read" | "kb-write" | "workspace-write";
5
5
  export type OperationEffectDeclaration = Readonly<{
6
6
  kind: OperationEffect;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/public/operations/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,CAAC;AACjC,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,WAAW,GACX,WAAW,GACX,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,aAAa,GACb,UAAU,GACV,kBAAkB,GAClB,qBAAqB,GACrB,WAAW,GACX,oBAAoB,GACpB,WAAW,GACX,UAAU,GACV,0BAA0B,GAC1B,sBAAsB,GACtB,uBAAuB,GACvB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,GACf,iBAAiB,CAAC;AAEtB,MAAM,MAAM,eAAe,GACvB,YAAY,GACZ,SAAS,GACT,gBAAgB,GAChB,cAAc,GACd,UAAU,GACV,iBAAiB,CAAC;AAEtB,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IAChD,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B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;OAGG;IACH,QAAQ,CAAC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAC9C,uEAAuE;IACvE,QAAQ,CAAC,eAAe,CAAC,EAAE,SAAS,0BAA0B,EAAE,CAAC;IACjE,sEAAsE;IACtE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,wDAAwD;IACxD,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1D,QAAQ,CAAC,OAAO,EAAE;QAChB,cAAc,CACZ,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;KAChC,CAAC,gBAAgB,CAAC,CAAC;CACrB;AAED,6EAA6E;AAC7E,MAAM,MAAM,qBAAqB,CAC/B,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACrC,CAAC,GAAG,OAAO,IACT,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;IACxB,QAAQ,CAAC,eAAe,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAChE,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC1D,CAAC"}
@@ -228,6 +228,7 @@ export type ProofReceipt = Readonly<{
228
228
  finished_at: string;
229
229
  artifact_digest: string;
230
230
  contract_hash: string;
231
+ binding_hash?: string;
231
232
  fingerprint: string;
232
233
  fingerprint_components: ProofFingerprintComponents;
233
234
  integration_id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"proof-receipt.d.ts","sourceRoot":"","sources":["../../src/public/proof-receipt.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAGhC,MAAM,wBAAwB,CAAC;AAChC,OAAO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AAO,CAAC,CAAC,EAAE,GAAG,SAAS,GAC7D,SAAS,MAAM,EAAE,CAqBnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/public/schemas/entity.ts"],"names":[],"mappings":"AA4TA,QAAA,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAoWzC,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../../src/public/schemas/entity.ts"],"names":[],"mappings":"AA6TA,QAAA,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CA4ZzC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -15,6 +15,7 @@
15
15
  You should have received a copy of the GNU Affero General Public License
16
16
  along with this program. If not, see <https://www.gnu.org/licenses/>.
17
17
  */
18
+ import { ENTITY_ORIGIN_SCHEMA } from "../entity-origin.js";
18
19
  import { PROOF_BINDINGS_SCHEMA, PROOF_CONTRACT_SCHEMA, } from "../proof-protocol.js";
19
20
  import { PROOF_RECEIPT_SCHEMA } from "../proof-receipt.js";
20
21
  // Typed fact field enums per proposal
@@ -335,6 +336,13 @@ const entitySchema = {
335
336
  severity: { type: "string" },
336
337
  links: { type: "array", items: { type: "string" } },
337
338
  text_ref: { type: "string" },
339
+ // Provenance of any authored entity: who wrote it and on what authority.
340
+ origin: ENTITY_ORIGIN_SCHEMA,
341
+ expects: {
342
+ type: "string",
343
+ enum: ["success", "rejection", "error"],
344
+ description: "Scenario-only. The scenario's intended outcome. A scenario that expects success and assumes (via `assumes` facts) a value a current requirement forbids fails the scenario-feasibility check.",
345
+ },
338
346
  proof_exempt: {
339
347
  type: "boolean",
340
348
  description: "Requirement-only. Marks a current requirement as intentionally outside E2E-proof scope; requires proof_exempt_reason.",
@@ -344,6 +352,30 @@ const entitySchema = {
344
352
  minLength: 1,
345
353
  description: "Requirement-only. Required when proof_exempt is true; surfaces as the applicability reason in coverage rows.",
346
354
  },
355
+ approved_by: {
356
+ type: "string",
357
+ minLength: 1,
358
+ pattern: "\\S",
359
+ description: "Requirement-only. The human who approved this exception requirement. An exception (a requirement that exempts another and is specified_by a scenario) makes that success scenario feasible only when approved_by is set.",
360
+ },
361
+ approval_ref: {
362
+ type: "string",
363
+ minLength: 1,
364
+ description: "Requirement-only. Optional reference to the approval decision record (ticket, ADR or review link) for an exception requirement.",
365
+ },
366
+ rationale: {
367
+ type: "string",
368
+ minLength: 1,
369
+ pattern: "\\S",
370
+ description: "Requirement-only. Why the requirement exists, in one or two sentences from whoever stated the intent. Explanation only: it is not part of the checked meaning.",
371
+ },
372
+ exempts_claims: {
373
+ type: "array",
374
+ minItems: 1,
375
+ uniqueItems: true,
376
+ items: { type: "string", pattern: "^CLAIM-[A-F0-9]{16}$" },
377
+ description: "Requirement-only. Narrows an exception requirement to individual clauses: the claim keys (from logic_claims) of the requirement it exempts whose constraints it waives. Without it the exception waives the whole exempted requirement.",
378
+ },
347
379
  semantic_text: {
348
380
  type: "string",
349
381
  description: "Requirement-only authored prose whose exact UTF-8 bytes anchor the semantic inventory without replacing text_ref evidence.",
@@ -500,6 +532,15 @@ const entitySchema = {
500
532
  argument_names: { type: "array", items: { type: "string" } },
501
533
  argument_types: { type: "array", items: { type: "string" } },
502
534
  argument_descriptions: { type: "array", items: { type: "string" } },
535
+ // predicate_schema only: the argument names that determine the remaining
536
+ // arguments. Rule comparison identifies two atoms of the predicate only
537
+ // when their key arguments are identical.
538
+ key_arguments: {
539
+ type: "array",
540
+ minItems: 1,
541
+ uniqueItems: true,
542
+ items: { type: "string", minLength: 1 },
543
+ },
503
544
  aliases: { type: "array", items: { type: "string" } },
504
545
  examples: { type: "array", items: { type: "string" } },
505
546
  predicate_args: { type: "array", items: { type: "string" } },
@@ -583,6 +624,7 @@ const entitySchema = {
583
624
  { required: ["argument_names"] },
584
625
  { required: ["argument_types"] },
585
626
  { required: ["argument_descriptions"] },
627
+ { required: ["key_arguments"] },
586
628
  { required: ["aliases"] },
587
629
  { required: ["examples"] },
588
630
  { required: ["predicate_args"] },
@@ -635,10 +677,20 @@ const entitySchema = {
635
677
  { required: ["semantic_source_hash"] },
636
678
  { required: ["proof_exempt"] },
637
679
  { required: ["proof_exempt_reason"] },
680
+ { required: ["approved_by"] },
681
+ { required: ["approval_ref"] },
682
+ { required: ["rationale"] },
683
+ { required: ["exempts_claims"] },
638
684
  ],
639
685
  },
640
686
  },
641
687
  },
688
+ {
689
+ if: {
690
+ properties: { type: { const: "scenario" } },
691
+ },
692
+ else: { not: { required: ["expects"] } },
693
+ },
642
694
  ...factConditionals,
643
695
  ],
644
696
  additionalProperties: false,
@@ -1 +1 @@
1
- {"version":3,"file":"relationship.d.ts","sourceRoot":"","sources":["../../../src/public/schemas/relationship.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"relationship.d.ts","sourceRoot":"","sources":["../../../src/public/schemas/relationship.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -40,6 +40,8 @@ const relationshipSchema = {
40
40
  "consumes",
41
41
  "supersedes",
42
42
  "restates",
43
+ "assumes",
44
+ "exempts",
43
45
  "relates_to",
44
46
  ],
45
47
  },
@@ -2,7 +2,7 @@
2
2
  id: kibi-bootstrap
3
3
  name: kibi-bootstrap
4
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.0
5
+ version: 3.1.1
6
6
  kibiCompatibility: ">=1.0.0"
7
7
  tags:
8
8
  - kibi
@@ -87,6 +87,11 @@ Finish with `kb_check` and `kb_status`.
87
87
  Consume the versioned `kibiProtocol: 1` result envelope: inspect `status`, `effects`,
88
88
  `diagnostics`, and `nextActions`. On `committed_with_repairs`, execute required
89
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.
90
95
 
91
96
  Kibi may author tracked Markdown/YAML/manifests and relationship shards
92
97
  transactionally, but never Git-stages or commits them. Never read or edit
@@ -14,3 +14,9 @@ approved hash; inspect its typed result
14
14
  and follow `nextActions` if it returns `committed_with_repairs`. Direct
15
15
  `kb_upsert` is forbidden for every bootstrap task; never manually replay the
16
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.
@@ -2,7 +2,7 @@
2
2
  id: kibi-usage
3
3
  name: Kibi Usage
4
4
  description: Use Kibi's source-first, exact-Git, migration-aware, proof-aware operations safely across MCP or the trusted local CLI, including partial completion repair.
5
- version: 2.2.0
5
+ version: 2.3.1
6
6
  kibiCompatibility: ">=1.0.0"
7
7
  tags:
8
8
  - kibi
@@ -47,6 +47,18 @@ Use whichever capability is visible and approved. The surfaces are equal peers:
47
47
  Hosts may expose prefixed identifiers such as `kibi_kb_search`,
48
48
  `kibi_kb_query`, and `kibi_kb_upsert`; map them to the canonical MCP names.
49
49
 
50
+ The MCP server keeps its tool list short. Load skills with `kb_skills`
51
+ (`action: "list" | "load" | "read"`; CLI `kibi skill` or `kibi skills
52
+ list|load|read`). Model prose with `kb_model` (`mode: "analyze"` for the
53
+ semantic advisor, `"requirement"` for strict claims, `"predicates"` for
54
+ ontology predicates; CLI `kibi model` or `semantic-advisor`,
55
+ `model-requirement`, `suggest-predicates`). Preflight a write with
56
+ `kb_upsert` plus `dryRun: true` (CLI `upsert` with `"dryRun": true` or
57
+ `validate-upsert`); it validates and writes nothing. Result payloads still name
58
+ catalog operations such as `kb_model_requirement` or `kb_validate_upsert` in
59
+ `recommended_tools` and repair steps; translate them with the list in
60
+ `resources/operation-access.md`.
61
+
50
62
  The CLI JSON route accepts the same business object as MCP:
51
63
 
52
64
  ```bash
@@ -73,13 +85,19 @@ runs where you are and needs no `workspaceRoot`.
73
85
  ## Safe workflow
74
86
 
75
87
  1. Always discover before you mutate: start with `kb_search`, then exact-filter with `kb_query`. Use
76
- `kb_status` when branch or freshness confidence matters. `kb_search` ranks
77
- lexically unless you pass `rankingMode: "intent-v1"`, `semanticFacets`, or
78
- `sourceLocations`; use intent mode with grounded facets for conceptual
79
- questions and before changing a source file, and keep lexical search for
80
- literal identifiers. See `resources/workflows.md` for the mode recipe.
81
- 2. Resolve genuine ambiguity with the human; use semantic advisor/modeling
82
- operations for deterministic interpretation and typed facts.
88
+ `kb_status` when branch or freshness confidence matters. `kb_search`
89
+ defaults to intent ranking, so you can ask it a question ("what governs
90
+ checkout rounding?"); its `data.answer` layer lists the current governing
91
+ requirements with linked facts, scenarios, tests, and ADRs, separates
92
+ superseded requirements, and labels observations as notes. Each governing
93
+ requirement also carries a `verdict` (`contradiction`, `infeasible`,
94
+ `unknown`, or `none`, which is not proof), the `exceptions` that exempt it,
95
+ and the `unknowns` the checks could not decide. Those links and verdicts are
96
+ discovery, not proof. Pass `sourceLocations` before changing a source file,
97
+ and `rankingMode: "legacy"` for literal identifier lookups. See
98
+ `resources/workflows.md` for the mode recipe.
99
+ 2. Resolve genuine ambiguity with the human; use `kb_model` for deterministic
100
+ interpretation and typed facts.
83
101
  3. Create endpoints before relationships and upsert small batches sequentially.
84
102
  Keep the canonical `REQ-* -> SCEN-* -> TEST-*` chain.
85
103
  4. Author tracked Markdown/YAML/manifests and relationship shards through Kibi;
@@ -91,9 +109,9 @@ runs where you are and needs no `workspaceRoot`.
91
109
  Run `kb_check` with specific rules during iteration and the unfiltered final
92
110
  check. Never fire `kb_upsert` calls in parallel; create or confirm endpoint
93
111
  entities before linking them. The canonical MCP names are `kb_search`,
94
- `kb_query`, `kb_upsert`, and `kb_check`.
112
+ `kb_query`, `kb_model`, `kb_upsert`, and `kb_check`.
95
113
 
96
- For a task that explicitly supplies a malformed concrete mutation payload, locate and read that public request artifact before choosing an entity, preserving its exact entity ID, type, requested changes, and every intended relationship and endpoint. Do not substitute a seeded or convenient entity for the requested target. Start with kb_search, then exact-filter those targets with kb_query, and run kb_validate_upsert on that same payload; validation is not completion. Correct only diagnosed pre-commit errors and revalidate the corrected payload. Once authorized, apply the identical corrected and authorized payload with kb_upsert. If it returns committed_with_repairs, treat the mutation as committed, follow only the required repair actions, and neither retry it nor trigger unrelated semantic backfill for a schema-only repair. Exact-read every changed entity and relationship endpoint with kb_query, then finish with an unfiltered kb_check followed by a final kb_status.
114
+ For a task that explicitly supplies a malformed concrete mutation payload, locate and read that public request artifact before choosing an entity, preserving its exact entity ID, type, requested changes, and every intended relationship and endpoint. Do not substitute a seeded or convenient entity for the requested target. Start with kb_search, then exact-filter those targets with kb_query, and run kb_upsert with dryRun: true on that same payload (CLI: validate-upsert); validation is not completion. Correct only diagnosed pre-commit errors and revalidate the corrected payload. Once authorized, apply the identical corrected and authorized payload with kb_upsert. If it returns committed_with_repairs, treat the mutation as committed, follow only the required repair actions, and neither retry it nor trigger unrelated semantic backfill for a schema-only repair. Exact-read every changed entity and relationship endpoint with kb_query, then finish with an unfiltered kb_check followed by a final kb_status.
97
115
 
98
116
  ## Closeout fields
99
117
 
@@ -124,8 +142,13 @@ migration, worktrees, quarantine, restore, and purge.
124
142
  ## Typed results and recovery
125
143
 
126
144
  Every CLI JSON/MCP result has `kibiProtocol`, `operation`, `resultVersion`,
127
- `status`, `data`, `effects`, `diagnostics`, and typed `nextActions`. Treat
128
- `status: error` as a failed pre-commit operation. If the status is
145
+ `status`, `data`, `effects`, `diagnostics`, and typed `nextActions`.
146
+ `status: error` normally means a failed pre-commit operation. The bootstrap
147
+ error `BOOTSTRAP_PLAN_REJECTED` can follow earlier committed actions: inspect
148
+ `data.actionResults` and `data.applied`, then re-plan from the current state.
149
+ Its journal is terminal; never recover or replay it. `BOOTSTRAP_PLAN_INVALID`
150
+ fails preflight before bootstrap writes or a new journal; obtain a corrected
151
+ plan. If the status is
129
152
  `committed_with_repairs`, the mutation already committed: inspect failed effects,
130
153
  execute each required repair action in order, and never retry the original
131
154
  operation. Record effect failures, followed actions, and unsafe retries in
@@ -138,8 +161,35 @@ Existing entities preserve body bytes when `document.body` is omitted; new
138
161
  requirements default their body to `semantic_text`. Relationship mutations
139
162
  patch canonical shards while preserving unrelated records. Authored entity
140
163
  deletion returns a hash-bound approval plan; requirements normally evolve via a
141
- new entity linked with `supersedes`. Read `resources/source-authoring.md` before
142
- source writes, deletion approval, or recovery.
164
+ new entity linked with `supersedes`; set the replaced requirement to
165
+ `status: closed` in the same change, because `kb_check` blocks an open
166
+ superseded requirement and supersession cycles. Kibi compiles `source` from
167
+ the entity's own file and never writes an authored `source` field, so
168
+ `kb_upsert` cannot change one. When `kb_check` blocks a leftover value
169
+ (`source-path-dangling`), run `kibi migrate`: its automatic
170
+ `source_path_rewrite` action removes the value, or rewrites it when the file
171
+ moved. Never hand-edit `.kb/` for it. Read `resources/source-authoring.md`
172
+ before source writes, deletion approval, or recovery.
173
+
174
+ `kb_apply_plan` applies a whole plan atomically: a failure changes nothing.
175
+ An interrupted plan is settled by the next `kb_apply_plan`, `kb_upsert`, or
176
+ `kb_delete` call, or by `kb_apply_plan` with its `recoveryJournalId`; never
177
+ re-apply the original plan. On a detached HEAD, reads answer from a read-only
178
+ snapshot and writes are refused; check out a branch before mutating.
179
+
180
+ ## Origin and approvals
181
+
182
+ Entities record `origin` (`kind`: `human`, `agent`, `migration`, or `import`,
183
+ plus optional `ref` and `approved_by`). `kb_upsert` records `kind: agent` on
184
+ entities you create; leave `origin.approved_by` to the person who reviews them.
185
+ An exception (a requirement that `exempts` another) exempts nothing until a
186
+ human sets `approved_by`; `kb_check` flags approvals an agent recorded without
187
+ corroboration. Never fill in an approval yourself. Record why a requirement
188
+ exists in `rationale`, or link the ADR that explains it.
189
+
190
+ Conditional clauses ("only when", "only if", "must not ... unless") compile
191
+ into typed `forbid` rules linked by `requires_rule`, not property facts; one
192
+ `kb_model` or `kb_compile_intent` cannot translate stays an `ontology_gap`.
143
193
 
144
194
  ## Semantic and proof guardrails
145
195
 
@@ -157,20 +207,20 @@ to committed `proof/baseline.json` with `kibi proof impact`.
157
207
 
158
208
  ## Predicate Ontology Decision Tree
159
209
 
160
- Call `kb_semantic_advisor` on the complete prose before encoding a clause.
210
+ Call `kb_model` with `mode: "analyze"` on the complete prose before encoding a clause.
161
211
  Set requirement `logic_claims` to exactly the assertive `claim_key` values.
162
- For each relational clause, call `kb_suggest_predicates` with that clause and
212
+ For each relational clause, call `kb_model` with `mode: "predicates"`, that clause, and
163
213
  `existingLogicClaims`. If lexical rank is a false positive, retry with the
164
214
  reviewed `schemaId`. If `binding_status` is `incomplete`, supply
165
215
  `argumentBindings` and retry. Persist `fact_kind: predicate` with the same
166
216
  `claim_key` / `claim_text`, then link `REQ -> fact` with `requires_predicate`.
167
- Use `kb_model_requirement` for strict scalar clauses. Use
217
+ Use `kb_model` with `mode: "requirement"` for strict scalar clauses. Use
168
218
  `fact_kind: observation` only for a true ontology gap. The manifest is not
169
219
  grounding: run `logic-coverage` so each key binds to one ground fact.
170
220
  Relationship direction is fixed, and every `from` in a relationship batch
171
221
  must equal the upserted entity ID.
172
222
 
173
- For conditional relational claims, after the initial `kb_suggest_predicates` and before any `kb_upsert`—including one needed for a missing schema—call read-only `kb_model_requirement` to preview suitable scalar or typed-rule modeling. Treat the preview as advisory: do not apply an irrelevant result or create unrequested facts, and retain an approved ground-predicate plan when it captures the whole claim. Preserve supplied arity, ordered argument roles, polarity, bound values, and one claim key per actual assertion; never split arguments across clauses or schemas or alter values to force uniqueness.
223
+ For conditional relational claims, after the initial `kb_model` predicates call and before any `kb_upsert`—including one needed for a missing schema—call read-only `kb_model` with `mode: "requirement"` to preview suitable scalar or typed-rule modeling. Treat the preview as advisory: do not apply an irrelevant result or create unrequested facts, and retain an approved ground-predicate plan when it captures the whole claim. Preserve supplied arity, ordered argument roles, polarity, bound values, and one claim key per actual assertion; never split arguments across clauses or schemas or alter values to force uniqueness.
174
224
 
175
225
  ## Symbol-First Traceability
176
226
 
@@ -4,7 +4,7 @@ Requirement prose remains the human-readable source. Facts add queryable semanti
4
4
 
5
5
  ## Atomic Claim Coverage
6
6
 
7
- Logical coverage is clause-based, not entity-based. Give `kb_semantic_advisor` the complete requirement body and verify that its `clauses` list contains every atomic obligation. Supply the `clauses` input yourself when automatic splitting would combine or omit obligations. For every normative clause:
7
+ Logical coverage is clause-based, not entity-based. Give `kb_model` (`mode: "analyze"`) the complete requirement body and verify that its `clauses` list contains every atomic obligation. Supply the `clauses` input yourself when automatic splitting would combine or omit obligations. For every normative clause:
8
8
 
9
9
  - preserve the returned stable key as `claim_key` and the exact clause as `claim_text` on its ground fact;
10
10
  - add the key to the exact current `logic_claims` set, removing only stale keys whose propositions no longer exist in the source;
@@ -17,7 +17,7 @@ Example compound prose: “Checkout requires payment authorization before order
17
17
 
18
18
  ## Predicate Lane (Relational Claims)
19
19
 
20
- Call `kb_semantic_advisor`, then `kb_suggest_predicates`. Apply a candidate only when its schema meaning and ordered arguments fit the claim. Use the returned `applyPlan` rather than hand-writing unsupported predicate names, and link the requirement to the predicate fact with `requires_predicate`.
20
+ Call `kb_model` with `mode: "analyze"`, then with `mode: "predicates"`. Apply a candidate only when its schema meaning and ordered arguments fit the claim. Use the returned `applyPlan` rather than hand-writing unsupported predicate names, and link the requirement to the predicate fact with `requires_predicate`.
21
21
 
22
22
  Treat the result as a Prolog-shaped ground term, not executable source: `predicate_name(arg1,...,argN)`. The selected `predicate_schema` fixes the name, arity, argument roles, and order. Store that model through `predicate_name`, `predicate_args`, `canonical_key`, and `polarity`; never interpolate prose into raw Prolog, introduce variables, or use a graph relationship such as `verified_by` as the predicate name.
23
23
 
@@ -84,15 +84,15 @@ The full logical representation of a requirement is the conjunction of all of it
84
84
 
85
85
  Treat the advisor's proposition status as a hard routing decision. `nonlogical`/`subjective` prose is not a logical claim: keep it as one observation when needed and do not add its key to `logic_claims`. `ambiguous` prose stays an ambiguity observation. `ontology_gap` prose stays unresolved unless an approved schema or validated Logic IR is available. Never split a subjective or commentary sentence into synthetic clauses just because it contains conditional words or domain vocabulary.
86
86
 
87
- If authorized input supplies `projectLocalSchemas`, use those signatures as the authority. Create the minimal `predicate_schema` endpoint before lookup, then rerun `kb_suggest_predicates` on the complete relation if the first lookup had no candidate. Apply exactly one ground predicate and one claim key for that relation. For `must not`, `never`, `cannot`, or `forbidden` wording, preserve the positive schema and set `polarity: deny`; do not turn the result into an asserted predicate or invent a negative name. An empty lookup before the declared schema exists is a retry condition, not proof of an ontology gap.
87
+ If authorized input supplies `projectLocalSchemas`, use those signatures as the authority. Create the minimal `predicate_schema` endpoint before lookup, then rerun `kb_model` with `mode: "predicates"` on the complete relation if the first lookup had no candidate. Apply exactly one ground predicate and one claim key for that relation. For `must not`, `never`, `cannot`, or `forbidden` wording, preserve the positive schema and set `polarity: deny`; do not turn the result into an asserted predicate or invent a negative name. An empty lookup before the declared schema exists is a retry condition, not proof of an ontology gap.
88
88
 
89
89
  ## Typed rule lane
90
90
 
91
- Use a validated `kibi.logic.v1` object for a proposition whose meaning includes a condition, exception, obligation, prohibition, permission, quantifier, cardinality bound, or bounded temporal relation. `kb_model_requirement` returns the `rule_schema` and `rule` facts plus a `requires_rule` edge. The rule stores canonical JSON and a deterministic hash; any rendered Prolog is an audit view and is never executed. Reject raw goals, function symbols, cuts, meta-calls, dynamic predicates, I/O, unsafe variables, unstratified negation, and unbounded aggregation. Keep the exact proposition in `claim_text`, its advisor key in `claim_key`, and its byte span in the semantic ledger. Run `rule-safety` and `rule-verifiability` before treating the rule as modeled.
91
+ Use a validated `kibi.logic.v1` object for a proposition whose meaning includes a condition, exception, obligation, prohibition, permission, quantifier, cardinality bound, or bounded temporal relation. `kb_model` with `mode: "requirement"` returns the `rule_schema` and `rule` facts plus a `requires_rule` edge. The rule stores canonical JSON and a deterministic hash; any rendered Prolog is an audit view and is never executed. Reject raw goals, function symbols, cuts, meta-calls, dynamic predicates, I/O, unsafe variables, unstratified negation, and unbounded aggregation. Keep the exact proposition in `claim_text`, its advisor key in `claim_key`, and its byte span in the semantic ledger. Run `rule-safety` and `rule-verifiability` before treating the rule as modeled.
92
92
 
93
93
  ### Strict scalar
94
94
 
95
- Claim: “Sessions expire after at most 30 minutes.” This is a scalar limit, not a predicate. Route it through `kb_model_requirement` to a subject plus `property_value` with `operator: lte`, `value_type: int`, and `value_int: 30`, linked by `constrains` and `requires_property`.
95
+ Claim: “Sessions expire after at most 30 minutes.” This is a scalar limit, not a predicate. Route it through `kb_model` with `mode: "requirement"` to a subject plus `property_value` with `operator: lte`, `value_type: int`, and `value_int: 30`, linked by `constrains` and `requires_property`.
96
96
 
97
97
  ### Ambiguous claim
98
98
 
@@ -19,7 +19,7 @@ are in `resources/fact-lanes.md` and the Predicate-First workflow in
19
19
  | Process or governance note | `meta` | usually `relates_to` |
20
20
  | Runtime or config gate | `flag` | `guards` |
21
21
 
22
- Call `kb_semantic_advisor` on the complete requirement body before encoding a
22
+ Call `kb_model` with `mode: "analyze"` on the complete requirement body before encoding a
23
23
  clause. Apply a predicate only when a returned schema fits; otherwise leave an
24
24
  ontology-gap observation.
25
25
 
@@ -4,12 +4,12 @@ Kibi stores human prose as readable requirement text, but verifiable meaning bel
4
4
 
5
5
  ## Two-pass extraction
6
6
 
7
- 1. Run `kb_semantic_advisor` over the complete text. Supply explicit `clauses` when sentence splitting could hide a condition, exception, definition, descriptive assertion, threshold, quantity, or temporal qualifier.
7
+ 1. Run `kb_model` with `mode: "analyze"` over the complete text. Supply explicit `clauses` when sentence splitting could hide a condition, exception, definition, descriptive assertion, threshold, quantity, or temporal qualifier.
8
8
  2. Audit the returned `propositions` against the original UTF-8 text. Every assertive span must be `modeled`, `ambiguous`, `ontology_gap`, or `missing`; rationale, examples, and subjective commentary are `nonlogical` and remain readable prose.
9
9
  3. For each assertive proposition, submit up to three typed `interpretations` when alternatives are plausible. Kibi compares canonical semantic keys; materially different valid interpretations remain unresolved regardless of confidence.
10
10
  4. Apply only a validated plan, then read back the requirement, rule schema, rule fact, and all relationship targets. Run `rule-safety`, `rule-verifiability`, `semantic-completeness`, `logic-coverage`, and `domain-contradictions` before the final unfiltered check.
11
11
 
12
- When a project-local schema names several ordered arguments, those arguments are facets of one relation, not separate propositions. Preserve the advisor claim key for the complete relation and do not manufacture clauses for each argument. Supporting `predicate_schema` facts carry the declared signature only; the ground predicate fact carries the claim provenance. Apply the exact `kb_suggest_predicates`/`kb_model_requirement` plan, reducing a rejected schema payload through `kb_validate_upsert` rather than silently downgrading a fitting declared relation to an observation.
12
+ When a project-local schema names several ordered arguments, those arguments are facets of one relation, not separate propositions. Preserve the advisor claim key for the complete relation and do not manufacture clauses for each argument. Supporting `predicate_schema` facts carry the declared signature only; the ground predicate fact carries the claim provenance. Apply the exact `kb_model` predicates/requirement plan, reducing a rejected schema payload through `kb_upsert` with `dryRun: true` rather than silently downgrading a fitting declared relation to an observation.
13
13
 
14
14
  ## Logic IR shape
15
15
 
@@ -4,11 +4,12 @@ Generated from the public `OperationSpec` catalog. CLI JSON and MCP structured
4
4
  content use the same `KibiResult` envelope (protocol 1); result data is versioned
5
5
  per operation. Effects are authoritative for mutability and adapter annotations.
6
6
 
7
- | MCP tool name | CLI route | Input mode | Mutability | Requires Prolog | Effects | Interface | Result version | Destructive | Retry safety | Open-world | Output schema |
7
+ | Operation | CLI route | Input mode | Mutability | Requires Prolog | Effects | Interface | Result version | Destructive | Retry safety | Open-world | Output schema |
8
8
  |---|---|---|---|---|---|---|---|---|---|---|---|
9
9
  | `kb_skills_list` | `skills-list` | --input JSON | read | no | local-read | peer; capability-selected | kibi.kb_skills_list.v1 | no | safe | no | yes |
10
10
  | `kb_skills_load` | `skills-load` | --input JSON | read | no | local-read | peer; capability-selected | kibi.kb_skills_load.v1 | no | safe | no | yes |
11
11
  | `kb_skills_read` | `skills-read` | --input JSON | read | no | local-read | peer; capability-selected | kibi.kb_skills_read.v1 | no | safe | no | yes |
12
+ | `kb_skills` | `skill` | --input JSON | read | no | local-read | peer; capability-selected | kibi.kb_skills.v1 | no | safe | no | yes |
12
13
  | `kb_query` | `query` | --input JSON or flags | read | yes | kb-read | peer; capability-selected | kibi.kb_query.v1 | no | safe | no | yes |
13
14
  | `kb_search` | `search` | --input JSON or flags | read | yes | kb-read | peer; capability-selected | kibi.kb_search.v1 | no | safe | no | yes |
14
15
  | `kb_status` | `status` | --input JSON or flags | read | no | kb-read, workspace-read | peer; capability-selected | kibi.kb_status.v1 | no | safe | no | yes |
@@ -18,6 +19,7 @@ per operation. Effects are authoritative for mutability and adapter annotations.
18
19
  | `kb_semantic_advisor` | `semantic-advisor` | --input JSON | read | no | local-read | peer; capability-selected | kibi.kb_semantic_advisor.v1 | no | safe | no | yes |
19
20
  | `kb_model_requirement` | `model-requirement` | --input JSON | read | yes | kb-read | peer; capability-selected | kibi.kb_model_requirement.v1 | no | safe | no | yes |
20
21
  | `kb_suggest_predicates` | `suggest-predicates` | --input JSON | read | yes | kb-read | peer; capability-selected | kibi.kb_suggest_predicates.v1 | no | safe | no | yes |
22
+ | `kb_model` | `model` | --input JSON | read | yes | kb-read | peer; capability-selected | kibi.kb_model.v1 | no | safe | no | yes |
21
23
  | `kb_plan_bootstrap` | `plan-bootstrap` | --input JSON | read | no | workspace-read | peer; capability-selected | kibi.kb_plan_bootstrap.v1 | no | safe | no | yes |
22
24
  | `kb_validate_upsert` | `validate-upsert` | --input JSON | read | yes | kb-read | peer; capability-selected | kibi.kb_validate_upsert.v1 | no | safe | no | yes |
23
25
  | `kb_upsert` | `upsert` | --input JSON | write | yes | kb-write, workspace-write | peer; capability-selected | kibi.kb_upsert.v1 | yes | unsafe | no | yes |
@@ -29,6 +31,28 @@ per operation. Effects are authoritative for mutability and adapter annotations.
29
31
  | `kb_apply_plan` | `apply-plan` | --input JSON | write | yes | kb-read, kb-write, workspace-read, workspace-write | peer; capability-selected | kibi.kb_apply_plan.v1 | yes | unsafe | no | yes |
30
32
  | `kb_ingest_proof` | `ingest-proof` | --input JSON | write | yes | kb-read, kb-write, workspace-read | peer; capability-selected | kibi.kb_ingest_proof.v1 | yes | unsafe | no | yes |
31
33
 
34
+ ## MCP tools versus catalog operations
35
+
36
+ The MCP server registers 16 tools. Most carry their catalog operation name; the
37
+ operations below are reached through a consolidated MCP call instead, while the
38
+ CLI keeps their dedicated routes. Result payloads (for example
39
+ `recommended_tools`, `suggested_next_tool`, or repair-plan steps) still name
40
+ catalog operations, so translate them with this list.
41
+
42
+ - `kb_skills_list`: MCP `kb_skills` with `action: "list"`; CLI `kibi skills list` (`skills-list`)
43
+ - `kb_skills_load`: MCP `kb_skills` with `action: "load"`; CLI `kibi skills load` (`skills-load`)
44
+ - `kb_skills_read`: MCP `kb_skills` with `action: "read"`; CLI `kibi skills read` (`skills-read`)
45
+ - `kb_semantic_advisor`: MCP `kb_model` with `mode: "analyze"`; CLI `kibi semantic-advisor` (`semantic-advisor`)
46
+ - `kb_model_requirement`: MCP `kb_model` with `mode: "requirement"`; CLI `kibi model-requirement` (`model-requirement`)
47
+ - `kb_suggest_predicates`: MCP `kb_model` with `mode: "predicates"`; CLI `kibi suggest-predicates` (`suggest-predicates`)
48
+ - `kb_validate_upsert`: MCP `kb_upsert` with `dryRun: true`; CLI `kibi validate-upsert` (`validate-upsert`)
49
+ - `kb_sparql_remote`: MCP `kb_sparql_remote`, registered only when `KIBI_MCP_OPTIONAL_TOOLS` names it; CLI `kibi sparql-remote` (`sparql-remote`)
50
+
51
+ The consolidated tools also have their own CLI routes: `kibi skill` for
52
+ `kb_skills` and `kibi model` for `kb_model`. `kb_job_status` is likewise
53
+ opt-in through `KIBI_MCP_OPTIONAL_TOOLS`; without it, `kb_check` with
54
+ `async: true` runs synchronously.
55
+
32
56
  ## JSON execution recipe
33
57
 
34
58
  Use a trusted project-local, non-installing runner. Stdin contains one UTF-8 JSON
@@ -82,14 +82,14 @@ diagnostics (`symbol_semantic_review_needed`).
82
82
 
83
83
  ## Workflow
84
84
 
85
- 1. `kb_semantic_advisor` on the full description; audit or supply `clauses`.
86
- 2. Relational clauses: `kb_suggest_predicates`, apply the predicate plan and
85
+ 1. `kb_model` (`mode: "analyze"`) on the full description; audit or supply `clauses`.
86
+ 2. Relational clauses: `kb_model` (`mode: "predicates"`), apply the predicate plan and
87
87
  `requires_predicate`.
88
- 3. Scalar placement/alignment/order clauses: `kb_model_requirement`, apply the strict
88
+ 3. Scalar placement/alignment/order clauses: `kb_model` (`mode: "requirement"`), apply the strict
89
89
  subject/property plan and `constrains` / `requires_property`.
90
90
  4. Preserve `claim_key` / `claim_text`; merge every key into the requirement
91
91
  `logic_claims` manifest.
92
- 5. `kb_validate_upsert`, create endpoints first, then sequential `kb_upsert`.
92
+ 5. `kb_upsert` with `dryRun: true`, create endpoints first, then sequential `kb_upsert`.
93
93
  6. `kb_check` with `logic-coverage`, `predicate-verifiability`, `domain-contradictions`,
94
94
  then a final unfiltered `kb_check`.
95
95