kibi-cli 2.4.0 → 2.5.1

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 (354) 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 +38 -12
  24. package/dist/commands/init.d.ts.map +1 -1
  25. package/dist/commands/init.js +10 -15
  26. package/dist/commands/migrate.d.ts.map +1 -1
  27. package/dist/commands/migrate.js +281 -14
  28. package/dist/commands/proof-compact.d.ts +9 -0
  29. package/dist/commands/proof-compact.d.ts.map +1 -0
  30. package/dist/commands/proof-compact.js +58 -0
  31. package/dist/commands/prove.d.ts +38 -0
  32. package/dist/commands/prove.d.ts.map +1 -1
  33. package/dist/commands/prove.js +222 -47
  34. package/dist/commands/sync/persistence.d.ts.map +1 -1
  35. package/dist/commands/sync/persistence.js +61 -16
  36. package/dist/commands/sync.d.ts +8 -0
  37. package/dist/commands/sync.d.ts.map +1 -1
  38. package/dist/commands/sync.js +42 -16
  39. package/dist/diagnostics.js +1 -1
  40. package/dist/engine-limits.d.ts +74 -0
  41. package/dist/engine-limits.d.ts.map +1 -0
  42. package/dist/engine-limits.js +201 -0
  43. package/dist/engine.d.ts +10 -0
  44. package/dist/engine.d.ts.map +1 -1
  45. package/dist/engine.js +57 -9
  46. package/dist/extractors/manifest.d.ts +8 -0
  47. package/dist/extractors/manifest.d.ts.map +1 -1
  48. package/dist/extractors/manifest.js +34 -5
  49. package/dist/extractors/markdown.d.ts +8 -0
  50. package/dist/extractors/markdown.d.ts.map +1 -1
  51. package/dist/extractors/markdown.js +57 -0
  52. package/dist/extractors/relationships.d.ts.map +1 -1
  53. package/dist/extractors/relationships.js +2 -0
  54. package/dist/intent-search.d.ts +4 -1
  55. package/dist/intent-search.d.ts.map +1 -1
  56. package/dist/intent-search.js +186 -33
  57. package/dist/operations/bootstrap/candidate-helpers.d.ts.map +1 -1
  58. package/dist/operations/bootstrap/candidate-helpers.js +8 -1
  59. package/dist/operations/bootstrap/candidates.d.ts.map +1 -1
  60. package/dist/operations/bootstrap/candidates.js +54 -38
  61. package/dist/operations/bootstrap/generate.d.ts +2 -0
  62. package/dist/operations/bootstrap/generate.d.ts.map +1 -1
  63. package/dist/operations/bootstrap/generate.js +87 -33
  64. package/dist/operations/bootstrap/intent-claims.d.ts.map +1 -1
  65. package/dist/operations/bootstrap/intent-claims.js +12 -4
  66. package/dist/operations/bootstrap/markdown-candidates.d.ts +2 -0
  67. package/dist/operations/bootstrap/markdown-candidates.d.ts.map +1 -1
  68. package/dist/operations/bootstrap/markdown-candidates.js +32 -10
  69. package/dist/operations/bootstrap/presentation.d.ts.map +1 -1
  70. package/dist/operations/bootstrap/presentation.js +6 -2
  71. package/dist/operations/bootstrap/requirement-claims.d.ts +1 -0
  72. package/dist/operations/bootstrap/requirement-claims.d.ts.map +1 -1
  73. package/dist/operations/bootstrap/requirement-claims.js +13 -1
  74. package/dist/operations/bootstrap/validation.d.ts +4 -0
  75. package/dist/operations/bootstrap/validation.d.ts.map +1 -0
  76. package/dist/operations/bootstrap/validation.js +20 -0
  77. package/dist/operations/migration/inventory-rederive.d.ts +81 -0
  78. package/dist/operations/migration/inventory-rederive.d.ts.map +1 -0
  79. package/dist/operations/migration/inventory-rederive.js +484 -0
  80. package/dist/operations/migration/kb-sources.d.ts +53 -0
  81. package/dist/operations/migration/kb-sources.d.ts.map +1 -0
  82. package/dist/operations/migration/kb-sources.js +233 -0
  83. package/dist/operations/migration/origin-backfill.d.ts +39 -0
  84. package/dist/operations/migration/origin-backfill.d.ts.map +1 -0
  85. package/dist/operations/migration/origin-backfill.js +164 -0
  86. package/dist/operations/migration/polarity-values.d.ts +10 -0
  87. package/dist/operations/migration/polarity-values.d.ts.map +1 -0
  88. package/dist/operations/migration/polarity-values.js +60 -0
  89. package/dist/operations/migration/schema6.d.ts +59 -0
  90. package/dist/operations/migration/schema6.d.ts.map +1 -0
  91. package/dist/operations/migration/schema6.js +379 -0
  92. package/dist/operations/migration/source-paths.d.ts +131 -0
  93. package/dist/operations/migration/source-paths.d.ts.map +1 -0
  94. package/dist/operations/migration/source-paths.js +308 -0
  95. package/dist/operations/migration/superseded-closure.d.ts +54 -0
  96. package/dist/operations/migration/superseded-closure.d.ts.map +1 -0
  97. package/dist/operations/migration/superseded-closure.js +187 -0
  98. package/dist/operations/modeling/logic-modeling.d.ts.map +1 -1
  99. package/dist/operations/modeling/logic-modeling.js +3 -5
  100. package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
  101. package/dist/operations/modeling/model-requirement.js +225 -67
  102. package/dist/operations/mutation/contradictions.d.ts +16 -0
  103. package/dist/operations/mutation/contradictions.d.ts.map +1 -1
  104. package/dist/operations/mutation/contradictions.js +32 -0
  105. package/dist/operations/mutation/delete.d.ts.map +1 -1
  106. package/dist/operations/mutation/delete.js +15 -7
  107. package/dist/operations/mutation/origin.d.ts +21 -0
  108. package/dist/operations/mutation/origin.d.ts.map +1 -0
  109. package/dist/operations/mutation/origin.js +78 -0
  110. package/dist/operations/mutation/plan-apply-journal.d.ts +182 -0
  111. package/dist/operations/mutation/plan-apply-journal.d.ts.map +1 -0
  112. package/dist/operations/mutation/plan-apply-journal.js +613 -0
  113. package/dist/operations/mutation/predicate-vocabulary-guard.d.ts +3 -1
  114. package/dist/operations/mutation/predicate-vocabulary-guard.d.ts.map +1 -1
  115. package/dist/operations/mutation/predicate-vocabulary-guard.js +13 -2
  116. package/dist/operations/mutation/relationships.d.ts +5 -5
  117. package/dist/operations/mutation/relationships.d.ts.map +1 -1
  118. package/dist/operations/mutation/relationships.js +31 -11
  119. package/dist/operations/mutation/serialization.d.ts.map +1 -1
  120. package/dist/operations/mutation/serialization.js +3 -1
  121. package/dist/operations/mutation/source-authoring.d.ts +6 -0
  122. package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
  123. package/dist/operations/mutation/source-authoring.js +7 -1
  124. package/dist/operations/mutation/types.d.ts +14 -0
  125. package/dist/operations/mutation/types.d.ts.map +1 -1
  126. package/dist/operations/mutation/upsert.d.ts +30 -3
  127. package/dist/operations/mutation/upsert.d.ts.map +1 -1
  128. package/dist/operations/mutation/upsert.js +105 -35
  129. package/dist/operations/mutation/validate-upsert.d.ts +6 -0
  130. package/dist/operations/mutation/validate-upsert.d.ts.map +1 -1
  131. package/dist/operations/mutation/validate-upsert.js +34 -30
  132. package/dist/operations/planning/apply-plan.d.ts.map +1 -1
  133. package/dist/operations/planning/apply-plan.js +753 -145
  134. package/dist/operations/planning/compile-intent.d.ts +34 -1
  135. package/dist/operations/planning/compile-intent.d.ts.map +1 -1
  136. package/dist/operations/planning/compile-intent.js +314 -98
  137. package/dist/operations/proof/code-scope.d.ts +28 -0
  138. package/dist/operations/proof/code-scope.d.ts.map +1 -1
  139. package/dist/operations/proof/code-scope.js +72 -0
  140. package/dist/operations/proof/compact-receipts.d.ts +49 -0
  141. package/dist/operations/proof/compact-receipts.d.ts.map +1 -0
  142. package/dist/operations/proof/compact-receipts.js +160 -0
  143. package/dist/operations/proof/ingest-proof.d.ts +2 -0
  144. package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
  145. package/dist/operations/proof/ingest-proof.js +44 -23
  146. package/dist/operations/proof/prune-receipts.d.ts.map +1 -1
  147. package/dist/operations/proof/prune-receipts.js +5 -9
  148. package/dist/operations/proof/receipt-compaction.d.ts +48 -0
  149. package/dist/operations/proof/receipt-compaction.d.ts.map +1 -0
  150. package/dist/operations/proof/receipt-compaction.js +121 -0
  151. package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -1
  152. package/dist/operations/semantic-advisor/analysis-receipt.js +12 -1
  153. package/dist/operations/semantic-advisor/analyze-prose.d.ts +2 -1
  154. package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
  155. package/dist/operations/semantic-advisor/analyze-prose.js +51 -5
  156. package/dist/operations/semantic-advisor/clauses.d.ts +1 -0
  157. package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -1
  158. package/dist/operations/semantic-advisor/clauses.js +11 -1
  159. package/dist/operations/semantic-advisor/conditional-rules.d.ts +33 -0
  160. package/dist/operations/semantic-advisor/conditional-rules.d.ts.map +1 -0
  161. package/dist/operations/semantic-advisor/conditional-rules.js +262 -0
  162. package/dist/operations/semantic-advisor/ingestion-boundary.d.ts +3 -1
  163. package/dist/operations/semantic-advisor/ingestion-boundary.d.ts.map +1 -1
  164. package/dist/operations/semantic-advisor/ingestion-boundary.js +14 -6
  165. package/dist/operations/semantic-advisor/plugin-orchestration.js +1 -1
  166. package/dist/prolog/codec.d.ts.map +1 -1
  167. package/dist/prolog/codec.js +2 -1
  168. package/dist/prolog.d.ts +9 -0
  169. package/dist/prolog.d.ts.map +1 -1
  170. package/dist/prolog.js +56 -10
  171. package/dist/proof/command-test-report.d.ts +74 -0
  172. package/dist/proof/command-test-report.d.ts.map +1 -0
  173. package/dist/proof/command-test-report.js +206 -0
  174. package/dist/public/branch-resolver.d.ts +1 -0
  175. package/dist/public/branch-resolver.d.ts.map +1 -1
  176. package/dist/public/branch-resolver.js +1 -0
  177. package/dist/public/entity-origin.d.ts +69 -0
  178. package/dist/public/entity-origin.d.ts.map +1 -0
  179. package/dist/public/entity-origin.js +142 -0
  180. package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
  181. package/dist/public/impact/full-kb-quality.js +1 -0
  182. package/dist/public/impact/requirement-quality.js +1 -1
  183. package/dist/public/operations/catalog.d.ts +130 -19
  184. package/dist/public/operations/catalog.d.ts.map +1 -1
  185. package/dist/public/operations/catalog.js +3 -0
  186. package/dist/public/operations/check-executor.d.ts.map +1 -1
  187. package/dist/public/operations/check-executor.js +8 -0
  188. package/dist/public/operations/contracts.d.ts +0 -5
  189. package/dist/public/operations/contracts.d.ts.map +1 -1
  190. package/dist/public/operations/contracts.js +63 -14
  191. package/dist/public/operations/discovery-entities.d.ts +15 -0
  192. package/dist/public/operations/discovery-entities.d.ts.map +1 -1
  193. package/dist/public/operations/discovery-entities.js +59 -0
  194. package/dist/public/operations/discovery-executors.d.ts +6 -1
  195. package/dist/public/operations/discovery-executors.d.ts.map +1 -1
  196. package/dist/public/operations/discovery-executors.js +65 -6
  197. package/dist/public/operations/index.d.ts +1 -0
  198. package/dist/public/operations/index.d.ts.map +1 -1
  199. package/dist/public/operations/index.js +1 -0
  200. package/dist/public/operations/migration-plan.d.ts +5 -0
  201. package/dist/public/operations/migration-plan.d.ts.map +1 -1
  202. package/dist/public/operations/migration-plan.js +26 -1
  203. package/dist/public/operations/node-ports.d.ts.map +1 -1
  204. package/dist/public/operations/node-ports.js +24 -3
  205. package/dist/public/operations/origin-review.d.ts +51 -0
  206. package/dist/public/operations/origin-review.d.ts.map +1 -0
  207. package/dist/public/operations/origin-review.js +307 -0
  208. package/dist/public/operations/predicate-schema-conformance.js +1 -1
  209. package/dist/public/operations/repair-plan.d.ts.map +1 -1
  210. package/dist/public/operations/repair-plan.js +4 -0
  211. package/dist/public/operations/result-envelope.d.ts.map +1 -1
  212. package/dist/public/operations/result-envelope.js +17 -5
  213. package/dist/public/operations/runtime-types.d.ts +9 -0
  214. package/dist/public/operations/runtime-types.d.ts.map +1 -1
  215. package/dist/public/operations/schema6-check-actions.d.ts +127 -0
  216. package/dist/public/operations/schema6-check-actions.d.ts.map +1 -0
  217. package/dist/public/operations/schema6-check-actions.js +575 -0
  218. package/dist/public/operations/source-path-dangling.d.ts +17 -0
  219. package/dist/public/operations/source-path-dangling.d.ts.map +1 -0
  220. package/dist/public/operations/source-path-dangling.js +66 -0
  221. package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
  222. package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
  223. package/dist/public/operations/specs/check-rules.generated.js +15 -1
  224. package/dist/public/operations/specs/check.d.ts +2 -2
  225. package/dist/public/operations/specs/check.js +1 -1
  226. package/dist/public/operations/specs/composite.d.ts +351 -0
  227. package/dist/public/operations/specs/composite.d.ts.map +1 -0
  228. package/dist/public/operations/specs/composite.js +96 -0
  229. package/dist/public/operations/specs/discovery.d.ts +8 -3
  230. package/dist/public/operations/specs/discovery.d.ts.map +1 -1
  231. package/dist/public/operations/specs/discovery.js +8 -3
  232. package/dist/public/operations/specs/modeling.d.ts +2 -2
  233. package/dist/public/operations/specs/modeling.js +2 -2
  234. package/dist/public/operations/specs/mutation-schemas.d.ts +73 -8
  235. package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
  236. package/dist/public/operations/specs/mutation-schemas.js +43 -7
  237. package/dist/public/operations/specs/mutation.d.ts +1 -1
  238. package/dist/public/operations/specs/mutation.js +1 -1
  239. package/dist/public/operations/specs/planning.d.ts +2 -2
  240. package/dist/public/operations/specs/planning.js +4 -4
  241. package/dist/public/operations/specs/reporting.d.ts.map +1 -1
  242. package/dist/public/operations/specs/reporting.js +13 -26
  243. package/dist/public/operations/specs/upsert.d.ts +79 -9
  244. package/dist/public/operations/specs/upsert.d.ts.map +1 -1
  245. package/dist/public/operations/specs/upsert.js +6 -1
  246. package/dist/public/operations/types.d.ts +1 -1
  247. package/dist/public/operations/types.d.ts.map +1 -1
  248. package/dist/public/proof-receipt.d.ts +1 -0
  249. package/dist/public/proof-receipt.d.ts.map +1 -1
  250. package/dist/public/schemas/entity.d.ts.map +1 -1
  251. package/dist/public/schemas/entity.js +52 -0
  252. package/dist/public/schemas/relationship.d.ts.map +1 -1
  253. package/dist/public/schemas/relationship.js +2 -0
  254. package/dist/public/skills/kibi-bootstrap/SKILL.md +35 -67
  255. package/dist/public/skills/kibi-bootstrap/resources/bootstrap.md +6 -0
  256. package/dist/public/skills/kibi-usage/SKILL.md +68 -18
  257. package/dist/public/skills/kibi-usage/resources/fact-lanes.md +5 -5
  258. package/dist/public/skills/kibi-usage/resources/kb-improvement.md +1 -1
  259. package/dist/public/skills/kibi-usage/resources/logic-ir.md +2 -2
  260. package/dist/public/skills/kibi-usage/resources/operation-access.md +25 -1
  261. package/dist/public/skills/kibi-usage/resources/ui-requirements.md +4 -4
  262. package/dist/public/skills/kibi-usage/resources/workflows.md +42 -25
  263. package/dist/public/telemetry-acceptance.d.ts +58 -2
  264. package/dist/public/telemetry-acceptance.d.ts.map +1 -1
  265. package/dist/public/telemetry-acceptance.js +136 -10
  266. package/dist/public/telemetry-remediation.d.ts.map +1 -1
  267. package/dist/public/telemetry-remediation.js +26 -10
  268. package/dist/relationships/shards.d.ts +13 -0
  269. package/dist/relationships/shards.d.ts.map +1 -1
  270. package/dist/relationships/shards.js +54 -28
  271. package/dist/runtime/cli-runtime.d.ts.map +1 -1
  272. package/dist/runtime/cli-runtime.js +44 -3
  273. package/dist/runtime/detached-snapshot.d.ts +38 -0
  274. package/dist/runtime/detached-snapshot.d.ts.map +1 -0
  275. package/dist/runtime/detached-snapshot.js +92 -0
  276. package/dist/schemas/entity.schema.json +122 -0
  277. package/dist/search-answer.d.ts +157 -0
  278. package/dist/search-answer.d.ts.map +1 -0
  279. package/dist/search-answer.js +846 -0
  280. package/dist/traceability/impact-knowledge.d.ts.map +1 -1
  281. package/dist/traceability/impact-knowledge.js +7 -0
  282. package/dist/traceability/symbol-extract.js +3 -3
  283. package/dist/traceability/temp-kb.d.ts.map +1 -1
  284. package/dist/traceability/temp-kb.js +12 -0
  285. package/dist/types/entities.d.ts +13 -0
  286. package/dist/types/entities.d.ts.map +1 -1
  287. package/dist/types/relationships.d.ts +1 -1
  288. package/dist/types/relationships.d.ts.map +1 -1
  289. package/dist/utils/branch-resolver.d.ts +37 -1
  290. package/dist/utils/branch-resolver.d.ts.map +1 -1
  291. package/dist/utils/branch-resolver.js +130 -3
  292. package/dist/utils/repo-relative-path.d.ts +18 -0
  293. package/dist/utils/repo-relative-path.d.ts.map +1 -0
  294. package/dist/utils/repo-relative-path.js +58 -0
  295. package/dist/utils/rule-registry.generated.d.ts +75 -3
  296. package/dist/utils/rule-registry.generated.d.ts.map +1 -1
  297. package/dist/utils/rule-registry.generated.js +89 -3
  298. package/dist/utils/schema-version.d.ts +1 -1
  299. package/dist/utils/schema-version.d.ts.map +1 -1
  300. package/dist/utils/schema-version.js +4 -3
  301. package/dist/utils/strict-modeling.d.ts +1 -1
  302. package/dist/utils/strict-modeling.d.ts.map +1 -1
  303. package/dist/utils/strict-modeling.js +23 -3
  304. package/package.json +3 -3
  305. package/schema/entities.pl +22 -0
  306. package/schema/relationships.pl +14 -0
  307. package/schema/validation.pl +45 -1
  308. package/src/public/branch-resolver.ts +1 -0
  309. package/src/public/entity-origin.ts +175 -0
  310. package/src/public/impact/full-kb-quality.ts +1 -0
  311. package/src/public/impact/requirement-quality.ts +1 -1
  312. package/src/public/operations/catalog.ts +3 -0
  313. package/src/public/operations/check-executor.ts +15 -0
  314. package/src/public/operations/contracts.ts +75 -15
  315. package/src/public/operations/discovery-entities.ts +74 -0
  316. package/src/public/operations/discovery-executors.ts +88 -10
  317. package/src/public/operations/index.ts +1 -0
  318. package/src/public/operations/migration-plan.ts +30 -1
  319. package/src/public/operations/node-ports.ts +24 -3
  320. package/src/public/operations/origin-review.ts +375 -0
  321. package/src/public/operations/predicate-schema-conformance.ts +1 -1
  322. package/src/public/operations/repair-plan.ts +4 -0
  323. package/src/public/operations/result-envelope.ts +18 -6
  324. package/src/public/operations/runtime-types.ts +9 -0
  325. package/src/public/operations/schema6-check-actions.ts +699 -0
  326. package/src/public/operations/source-path-dangling.ts +81 -0
  327. package/src/public/operations/specs/check-rules.generated.ts +15 -1
  328. package/src/public/operations/specs/check.ts +1 -1
  329. package/src/public/operations/specs/composite.ts +141 -0
  330. package/src/public/operations/specs/discovery.ts +9 -3
  331. package/src/public/operations/specs/modeling.ts +2 -2
  332. package/src/public/operations/specs/mutation-schemas.ts +49 -7
  333. package/src/public/operations/specs/mutation.ts +1 -1
  334. package/src/public/operations/specs/planning.ts +4 -4
  335. package/src/public/operations/specs/reporting.ts +13 -38
  336. package/src/public/operations/specs/upsert.ts +7 -1
  337. package/src/public/operations/types.ts +2 -0
  338. package/src/public/proof-receipt.ts +1 -0
  339. package/src/public/schemas/entity.ts +57 -0
  340. package/src/public/schemas/relationship.ts +2 -0
  341. package/src/public/skills/kibi-bootstrap/SKILL.md +35 -67
  342. package/src/public/skills/kibi-bootstrap/resources/bootstrap.md +6 -0
  343. package/src/public/skills/kibi-usage/SKILL.md +68 -18
  344. package/src/public/skills/kibi-usage/resources/fact-lanes.md +5 -5
  345. package/src/public/skills/kibi-usage/resources/kb-improvement.md +1 -1
  346. package/src/public/skills/kibi-usage/resources/logic-ir.md +2 -2
  347. package/src/public/skills/kibi-usage/resources/operation-access.md +25 -1
  348. package/src/public/skills/kibi-usage/resources/ui-requirements.md +4 -4
  349. package/src/public/skills/kibi-usage/resources/workflows.md +42 -25
  350. package/src/public/telemetry-acceptance-types.d.ts +4 -1
  351. package/src/public/telemetry-acceptance.ts +204 -10
  352. package/src/public/telemetry-remediation.ts +39 -10
  353. package/src/schemas/entity.schema.json +122 -0
  354. package/src/schemas/relationship.schema.json +2 -0
@@ -1,5 +1,5 @@
1
1
  /** Every selectable kb_check rule name, registry order. */
2
2
  export declare const SELECTABLE_RULE_NAMES: readonly string[];
3
3
  /** Comma-separated "Allowed:" fragment for the kb_check rules description. */
4
- export declare const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, predicate-schema-conformance";
4
+ export declare const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance";
5
5
  //# sourceMappingURL=check-rules.generated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-rules.generated.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/check-rules.generated.ts"],"names":[],"mappings":"AAUA,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EA4BlD,CAAC;AAGF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,ijBAC2gB,CAAC"}
1
+ {"version":3,"file":"check-rules.generated.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/check-rules.generated.ts"],"names":[],"mappings":"AAUA,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EA0ClD,CAAC;AAGF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,04BACo2B,CAAC"}
@@ -14,9 +14,16 @@ export const SELECTABLE_RULE_NAMES = [
14
14
  "symbol-traceability",
15
15
  "no-dangling-refs",
16
16
  "source-relationship-parity",
17
+ "source-path-dangling",
17
18
  "no-cycles",
18
19
  "required-fields",
19
20
  "deprecated-adr-no-successor",
21
+ "superseded-requirement-open",
22
+ "scenario-feasibility",
23
+ "scenario-feasibility-unknown",
24
+ "exception-claim-keys",
25
+ "numeric-string-value",
26
+ "rule-key-arguments-missing",
20
27
  "domain-contradictions",
21
28
  "logic-coverage",
22
29
  "rule-safety",
@@ -35,8 +42,15 @@ export const SELECTABLE_RULE_NAMES = [
35
42
  "subject-key-identity",
36
43
  "subject-key-shape",
37
44
  "ontology-quality",
45
+ "exception-unapproved",
46
+ "exception-approval-self-attested",
47
+ "agent-requirement-unapproved",
48
+ "requirement-rationale-missing",
49
+ "symbol-owner-superseded",
50
+ "adr-unlinked",
51
+ "adr-proposed",
38
52
  "predicate-schema-conformance",
39
53
  ];
40
54
  // implements REQ-006
41
55
  /** Comma-separated "Allowed:" fragment for the kb_check rules description. */
42
- export const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, predicate-schema-conformance";
56
+ export const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance";
@@ -12,7 +12,7 @@ export declare const checkSpec: {
12
12
  readonly type: "string";
13
13
  readonly enum: readonly string[];
14
14
  };
15
- readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, predicate-schema-conformance. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
15
+ readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
16
16
  };
17
17
  readonly sourceFiles: {
18
18
  readonly type: "array";
@@ -45,7 +45,7 @@ export declare const checkSpec: {
45
45
  readonly async: {
46
46
  readonly type: "boolean";
47
47
  readonly default: false;
48
- readonly description: "When true, start the check as a background job and return a kibi.job.v1 receipt immediately instead of holding the request until the tool timeout. Poll kb_job_status with the returned jobId. Use for full checks on large KBs that exceed the configured tool timeout.";
48
+ readonly description: "When true, start the check as a background job and return a kibi.job.v1 receipt immediately instead of holding the request until the tool timeout. Poll kb_job_status with the returned jobId. Use for full checks on large KBs that exceed the configured tool timeout. The MCP server registers kb_job_status only when KIBI_MCP_OPTIONAL_TOOLS includes it; otherwise async runs the check synchronously.";
49
49
  };
50
50
  };
51
51
  };
@@ -44,7 +44,7 @@ export const checkSpec = {
44
44
  async: {
45
45
  type: "boolean",
46
46
  default: false,
47
- description: "When true, start the check as a background job and return a kibi.job.v1 receipt immediately instead of holding the request until the tool timeout. Poll kb_job_status with the returned jobId. Use for full checks on large KBs that exceed the configured tool timeout.",
47
+ description: "When true, start the check as a background job and return a kibi.job.v1 receipt immediately instead of holding the request until the tool timeout. Poll kb_job_status with the returned jobId. Use for full checks on large KBs that exceed the configured tool timeout. The MCP server registers kb_job_status only when KIBI_MCP_OPTIONAL_TOOLS includes it; otherwise async runs the check synchronously.",
48
48
  },
49
49
  },
50
50
  },
@@ -0,0 +1,351 @@
1
+ import type { OperationContext } from "../runtime-types.js";
2
+ import type { OperationResult } from "../types.js";
3
+ /**
4
+ * Composite operations keep the agent-facing tool list short. Each one
5
+ * dispatches to an existing operation by `action` or `mode` and returns that
6
+ * operation's payload unchanged plus the selector, so the narrower CLI routes
7
+ * and the composite tool always agree.
8
+ */
9
+ type Executor = (input: never, context: OperationContext) => Promise<unknown>;
10
+ export declare function dispatchComposite(selector: "action" | "mode", routes: Readonly<Record<string, {
11
+ readonly execute: Executor;
12
+ readonly businessInputSchema: Readonly<Record<string, unknown>>;
13
+ }>>, input: Readonly<Record<string, unknown>>, context: OperationContext): Promise<OperationResult<Record<string, unknown>>>;
14
+ export declare const SKILL_ROUTES: {
15
+ readonly list: {
16
+ readonly name: "kb_skills_list";
17
+ readonly cliName: "skills list";
18
+ readonly description: "List bundled Kibi agent skills available for progressive disclosure. Read-only; does not mutate the KB or require Prolog.";
19
+ readonly businessInputSchema: {
20
+ readonly type: "object";
21
+ readonly properties: {};
22
+ };
23
+ readonly requiresProlog: false;
24
+ readonly effects: readonly ["local-read"];
25
+ readonly execute: (_input: Readonly<Record<string, unknown>>, _context: OperationContext) => Promise<OperationResult<{
26
+ readonly skills: readonly import("../../skills.js").SkillManifest[];
27
+ }>>;
28
+ };
29
+ readonly load: {
30
+ readonly name: "kb_skills_load";
31
+ readonly cliName: "skills load";
32
+ readonly description: "Load a bundled Kibi agent skill by ID, returning its manifest metadata, Markdown body, declared resources, content hash, and source type. Read-only; does not execute scripts or require Prolog.";
33
+ readonly businessInputSchema: {
34
+ readonly type: "object";
35
+ readonly required: readonly ["id"];
36
+ readonly properties: {
37
+ readonly id: {
38
+ readonly type: "string";
39
+ readonly description: "Bundled skill ID to load. Example: 'kibi-usage'.";
40
+ };
41
+ };
42
+ };
43
+ readonly requiresProlog: false;
44
+ readonly effects: readonly ["local-read"];
45
+ readonly execute: (input: Readonly<Record<string, unknown>>, _context: OperationContext) => Promise<OperationResult<{
46
+ readonly metadata: import("../../skills.js").SkillManifest;
47
+ readonly body: string;
48
+ readonly resources: readonly string[];
49
+ readonly contentHash: string;
50
+ readonly sourceType: "bundled";
51
+ }>>;
52
+ };
53
+ readonly read: {
54
+ readonly name: "kb_skills_read";
55
+ readonly cliName: "skills read";
56
+ readonly description: "Read a declared resource from a bundled Kibi agent skill. Resource paths are restricted to the skill manifest; arbitrary file paths are not exposed. Read-only; does not require Prolog.";
57
+ readonly businessInputSchema: {
58
+ readonly type: "object";
59
+ readonly required: readonly ["id", "resource"];
60
+ readonly properties: {
61
+ readonly id: {
62
+ readonly type: "string";
63
+ readonly description: "Bundled skill ID. Example: 'kibi-usage'.";
64
+ };
65
+ readonly resource: {
66
+ readonly type: "string";
67
+ readonly description: "Manifest-declared resource path to read. Example: 'resources/workflows.md'.";
68
+ };
69
+ };
70
+ };
71
+ readonly requiresProlog: false;
72
+ readonly effects: readonly ["local-read"];
73
+ readonly execute: (input: Readonly<Record<string, unknown>>, _context: OperationContext) => Promise<OperationResult<{
74
+ readonly content: string;
75
+ }>>;
76
+ };
77
+ };
78
+ export declare const MODEL_ROUTES: {
79
+ readonly analyze: {
80
+ readonly name: "kb_semantic_advisor";
81
+ readonly cliName: "semantic-advisor";
82
+ readonly description: "Analyze requirement prose without mutating the KB and return semantic advisor receipts with modeling suggestions. Use before constructing kb_upsert payloads when prose may contain machine-checkable logic. Suggestions can include strict-property facts, predicate facts, ambiguity observations, or ontology-gap observations; all suggestions are advisory and reviewable.";
83
+ readonly businessInputSchema: {
84
+ readonly type: "object";
85
+ readonly required: readonly ["text"];
86
+ readonly properties: {
87
+ readonly text: {
88
+ readonly type: "string";
89
+ readonly description: "Requirement prose to inspect for machine-checkable modeling suggestions.";
90
+ };
91
+ readonly clauses: {
92
+ readonly type: "array";
93
+ readonly items: {
94
+ readonly type: "string";
95
+ };
96
+ readonly description: "Optional complete list of atomic requirement clauses supplied by the caller. Use this for compound prose so every normative clause receives a stable claim key and independent grounding review.";
97
+ };
98
+ readonly interpretations: {
99
+ readonly type: "array";
100
+ readonly maxItems: 3;
101
+ readonly description: "Optional host-LLM typed kibi.logic.v1 interpretations. Kibi validates and canonicalizes them; raw Prolog is not accepted.";
102
+ readonly items: {
103
+ readonly type: "object";
104
+ readonly required: readonly ["claim_key", "claim_text", "ir"];
105
+ readonly properties: {
106
+ readonly claim_key: {
107
+ readonly type: "string";
108
+ };
109
+ readonly claim_text: {
110
+ readonly type: "string";
111
+ };
112
+ readonly confidence: {
113
+ readonly type: "number";
114
+ readonly minimum: 0;
115
+ readonly maximum: 1;
116
+ };
117
+ readonly span: {
118
+ readonly type: "object";
119
+ };
120
+ readonly ir: {
121
+ readonly type: "object";
122
+ };
123
+ };
124
+ };
125
+ };
126
+ readonly type: {
127
+ readonly type: "string";
128
+ readonly enum: readonly ["req", "scenario", "test", "adr", "flag", "event", "symbol", "fact"];
129
+ readonly default: "req";
130
+ readonly description: "Entity type context for analysis. Requirement, domain-fact, and supporting prose all receive a proposition ledger; only requirements receive deterministic modeling suggestions.";
131
+ };
132
+ readonly id: {
133
+ readonly type: "string";
134
+ readonly description: "Optional requirement ID used for deterministic draft relationship guidance.";
135
+ };
136
+ readonly title: {
137
+ readonly type: "string";
138
+ readonly description: "Optional requirement title for draft apply plans.";
139
+ };
140
+ readonly source: {
141
+ readonly type: "string";
142
+ readonly description: "Optional provenance for draft suggestions.";
143
+ };
144
+ readonly status: {
145
+ readonly type: "string";
146
+ readonly description: "Optional requirement status for draft suggestions.";
147
+ };
148
+ };
149
+ };
150
+ readonly requiresProlog: false;
151
+ readonly effects: readonly ["local-read"];
152
+ readonly execute: (input: Readonly<Record<string, unknown>>, context: OperationContext) => Promise<import("../../../operations/semantic-advisor/types.js").SemanticAdvisorOperationResult>;
153
+ };
154
+ readonly requirement: {
155
+ readonly name: "kb_model_requirement";
156
+ readonly cliName: "model-requirement";
157
+ readonly description: "Convert a prose requirement plus optional extracted claim fields into a deterministic strict-lane write set. Read-only modeling returns a sequential applyPlan for later kb_upsert calls. High-confidence claims emit req+fact strict output; lower-confidence claims emit an observation review artifact. Includes migration warnings when legacy schemaVersion metadata is detected.";
158
+ readonly businessInputSchema: {
159
+ readonly type: "object";
160
+ readonly required: readonly ["text"];
161
+ readonly properties: {
162
+ readonly text: {
163
+ readonly type: "string";
164
+ readonly description: "Required prose requirement text to model. Example: 'Customer data must be retained for 7 years.'";
165
+ };
166
+ readonly source: {
167
+ readonly type: "string";
168
+ readonly description: "Optional primary source path or provenance root used for stable IDs and text refs. Example: '.kb/requirements/customer-retention.md'.";
169
+ };
170
+ readonly sourceFiles: {
171
+ readonly type: "array";
172
+ readonly items: {
173
+ readonly type: "string";
174
+ };
175
+ readonly description: "Optional related source files. The first value is used as the source fallback when source is omitted.";
176
+ };
177
+ readonly confidence: {
178
+ readonly type: "number";
179
+ readonly default: 0.8;
180
+ readonly minimum: 0;
181
+ readonly maximum: 1;
182
+ readonly description: "Confidence score for the extracted claim. >= 0.70 yields strict-lane output; lower confidence yields observation-only review output.";
183
+ };
184
+ readonly subjectKey: {
185
+ readonly type: "string";
186
+ readonly description: "Optional extracted semantic claim subjectKey. Example: 'Customer.Data'.";
187
+ };
188
+ readonly propertyKey: {
189
+ readonly type: "string";
190
+ readonly description: "Optional extracted semantic claim propertyKey. Example: 'Retention Years'.";
191
+ };
192
+ readonly operator: {
193
+ readonly type: "string";
194
+ readonly enum: readonly ["eq", "gt", "gte", "lt", "lte", "neq", "bool", "polarity"];
195
+ readonly description: "Optional extracted semantic claim operator. Use gt/lt for strict bounds ('greater than zero' is gt 0, not gte 0). Example: 'eq'.";
196
+ };
197
+ readonly value: {
198
+ readonly description: "Optional extracted semantic claim value. Accepts string, number, or boolean.";
199
+ };
200
+ readonly provenance: {
201
+ readonly type: "string";
202
+ readonly description: "Optional extracted text reference. Falls back to source when omitted. Example: '.kb/requirements/customer-retention.md#L1'.";
203
+ };
204
+ readonly existingLogicClaims: {
205
+ readonly type: "array";
206
+ readonly items: {
207
+ readonly type: "string";
208
+ readonly pattern: "^CLAIM-[A-F0-9]{16}$";
209
+ };
210
+ readonly uniqueItems: true;
211
+ readonly description: "Existing requirement logic_claims values. The returned requirement update merges the new atomic claim key into this manifest instead of replacing prior claims.";
212
+ };
213
+ readonly requirementId: {
214
+ readonly type: "string";
215
+ readonly description: "Optional existing requirement ID to receive the requires_rule relationship.";
216
+ };
217
+ readonly claimKey: {
218
+ readonly type: "string";
219
+ readonly description: "Optional advisor-issued claim key for the exact proposition represented by logic.";
220
+ };
221
+ readonly claimText: {
222
+ readonly type: "string";
223
+ readonly description: "Optional exact proposition text represented by logic; defaults to text.";
224
+ };
225
+ readonly logic: {
226
+ readonly type: "object";
227
+ readonly description: "Optional typed kibi.logic.v1 IR. Kibi validates and canonicalizes it into a rule fact; raw Prolog is rejected.";
228
+ };
229
+ };
230
+ };
231
+ readonly requiresProlog: true;
232
+ readonly effects: readonly ["kb-read"];
233
+ readonly execute: typeof import("../../../operations/modeling/model-requirement.js").executeModelRequirement;
234
+ };
235
+ readonly predicates: {
236
+ readonly name: "kb_suggest_predicates";
237
+ readonly cliName: "suggest-predicates";
238
+ readonly description: "Suggest ontology predicate schemas for prose requirements before agents write facts. Retrieval/ranking is followed by a semantic applicability gate and conservative binding review; complete-looking generic placeholders never trigger application. Read-only guidance returns additive candidate diagnostics, an applicable predicate-fact plan only for a semantically eligible candidate with reviewed bindings, or an explicit ontology-gap observation plus a deterministic review-only predicate schema draft when no schema fits.";
239
+ readonly businessInputSchema: {
240
+ readonly type: "object";
241
+ readonly required: readonly ["text"];
242
+ readonly properties: {
243
+ readonly text: {
244
+ readonly type: "string";
245
+ readonly description: "Required prose requirement or claim to classify into ontology predicates. Example: 'When users navigate away, draft edits must auto-save.'.";
246
+ };
247
+ readonly requirementId: {
248
+ readonly type: "string";
249
+ readonly description: "Optional existing requirement ID. When provided, the response includes a relationshipPlan describing the req -> fact requires_predicate link to attach after preserving existing requirement metadata.";
250
+ };
251
+ readonly source: {
252
+ readonly type: "string";
253
+ readonly description: "Optional provenance or text reference for generated predicate facts or ontology-gap observations.";
254
+ };
255
+ readonly subjectHint: {
256
+ readonly type: "string";
257
+ readonly description: "Optional canonical subject key to use as the first predicate argument. Example: 'editor.annotation'.";
258
+ };
259
+ readonly maxCandidates: {
260
+ readonly type: "integer";
261
+ readonly default: 5;
262
+ readonly minimum: 1;
263
+ readonly maximum: 20;
264
+ readonly description: "Maximum ranked predicate candidates to return. Default: 5.";
265
+ };
266
+ readonly minScore: {
267
+ readonly type: "number";
268
+ readonly default: 0.35;
269
+ readonly minimum: 0;
270
+ readonly maximum: 1;
271
+ readonly description: "Minimum candidate score. Higher values make ontology-gap fallback more likely. Default: 0.35.";
272
+ };
273
+ readonly includeExistingSchemas: {
274
+ readonly type: "boolean";
275
+ readonly default: true;
276
+ readonly description: "Whether to include existing KB fact_kind=predicate_schema facts alongside Kibi's built-in predicate catalog. Default: true.";
277
+ };
278
+ readonly schemaId: {
279
+ readonly type: "string";
280
+ readonly minLength: 1;
281
+ readonly description: "Optional exact reviewed predicate schema ID. When supplied, Kibi selects that schema instead of lexical rank order and fails closed if it is unavailable.";
282
+ };
283
+ readonly argumentBindings: {
284
+ readonly type: "object";
285
+ readonly additionalProperties: {
286
+ readonly type: "string";
287
+ readonly minLength: 1;
288
+ };
289
+ readonly description: "Optional exact predicate argument values keyed by a candidate schema's argument_names. Required before applying a candidate whose binding_status is incomplete; Kibi never substitutes guessed values for unbound arguments.";
290
+ };
291
+ readonly polarityHint: {
292
+ readonly type: "string";
293
+ readonly enum: readonly ["assert", "deny"];
294
+ readonly description: "Optional reviewed polarity override for claims whose surface negation does not express predicate denial. Use only after reviewing the selected schema and full claim scope.";
295
+ };
296
+ readonly existingLogicClaims: {
297
+ readonly type: "array";
298
+ readonly items: {
299
+ readonly type: "string";
300
+ readonly pattern: "^CLAIM-[A-F0-9]{16}$";
301
+ };
302
+ readonly uniqueItems: true;
303
+ readonly description: "Existing requirement logic_claims values. Returned relationship guidance includes a merged manifest so repeated clause modeling does not discard earlier claims.";
304
+ };
305
+ };
306
+ };
307
+ readonly requiresProlog: true;
308
+ readonly effects: readonly ["kb-read"];
309
+ readonly execute: typeof import("../../../operations/modeling/suggest-predicates.js").executeSuggestPredicates;
310
+ };
311
+ };
312
+ export declare const skillsSpec: {
313
+ readonly name: "kb_skills";
314
+ readonly cliName: "skill";
315
+ readonly description: "Read bundled Kibi agent skills (workflow guidance). action:list returns the catalog; action:load returns a skill's metadata, Markdown body, declared resources and content hash (start with id 'kibi-usage'); action:read returns one manifest-declared resource. Read-only; does not require Prolog.";
316
+ readonly businessInputSchema: {
317
+ readonly type: "object";
318
+ readonly required: readonly ["action"];
319
+ readonly properties: {
320
+ readonly action: {
321
+ readonly type: "string";
322
+ readonly enum: readonly ["list", "load", "read"];
323
+ readonly description: "list, load (needs id) or read (needs id and resource).";
324
+ };
325
+ };
326
+ };
327
+ readonly requiresProlog: false;
328
+ readonly effects: readonly ["local-read"];
329
+ readonly execute: (input: Readonly<Record<string, unknown>>, context: OperationContext) => Promise<OperationResult<Record<string, unknown>>>;
330
+ };
331
+ export declare const modelSpec: {
332
+ readonly name: "kb_model";
333
+ readonly cliName: "model";
334
+ readonly description: "Turn requirement prose into checkable structure without writing the KB. mode:analyze returns the semantic advisor receipt: the clause ledger, what is grounded, what is ambiguous and suggested modeling (pass clauses for compound prose and optional typed kibi.logic.v1 interpretations). mode:requirement converts one claim (subjectKey, propertyKey, operator, value, or typed logic) into a strict-lane write set and applyPlan. mode:predicates ranks ontology predicate schemas and returns an applicable predicate-fact plan only for reviewed bindings, otherwise an ontology-gap observation. Apply returned plans with kb_upsert.";
335
+ readonly businessInputSchema: {
336
+ readonly type: "object";
337
+ readonly required: readonly ["mode", "text"];
338
+ readonly properties: {
339
+ readonly mode: {
340
+ readonly type: "string";
341
+ readonly enum: readonly ["analyze", "requirement", "predicates"];
342
+ readonly description: "analyze (advisor receipt), requirement (strict claim write set) or predicates (ontology predicate plan).";
343
+ };
344
+ };
345
+ };
346
+ readonly requiresProlog: true;
347
+ readonly effects: readonly ["kb-read"];
348
+ readonly execute: (input: Readonly<Record<string, unknown>>, context: OperationContext) => Promise<OperationResult<Record<string, unknown>>>;
349
+ };
350
+ export {};
351
+ //# sourceMappingURL=composite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composite.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/composite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,aAAa,CAAC;AAMlE;;;;;GAKG;AACH,KAAK,QAAQ,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAkB9E,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,QAAQ,GAAG,MAAM,EAC3B,MAAM,EAAE,QAAQ,CACd,MAAM,CACJ,MAAM,EACN;IACE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC3B,QAAQ,CAAC,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACjE,CACF,CACF,EACD,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACxC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CA+BnD;AAGD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIf,CAAC;AAGX,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIf,CAAC;AAGX,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;CAqBW,CAAC;AAGnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;CAwBY,CAAC"}
@@ -0,0 +1,96 @@
1
+ import { modelRequirementSpec, suggestPredicatesSpec } from "./modeling.js";
2
+ import { semanticAdvisorSpec } from "./semantic.js";
3
+ import { skillsListSpec, skillsLoadSpec, skillsReadSpec } from "./skills.js";
4
+ function properties(spec) {
5
+ const props = spec.businessInputSchema.properties;
6
+ return props && typeof props === "object"
7
+ ? props
8
+ : {};
9
+ }
10
+ function requiredFields(spec) {
11
+ const required = spec.businessInputSchema.required;
12
+ return Array.isArray(required) ? required : [];
13
+ }
14
+ export async function dispatchComposite(selector, routes, input, context) {
15
+ const choice = input[selector];
16
+ const route = typeof choice === "string" ? routes[choice] : undefined;
17
+ if (route === undefined) {
18
+ throw new Error(`${selector} must be one of: ${Object.keys(routes).join(", ")}`);
19
+ }
20
+ const { [selector]: _selector, ...rest } = input;
21
+ for (const field of requiredFields(route)) {
22
+ if (rest[field] === undefined) {
23
+ throw new Error(`${field} is required when ${selector} is ${choice}`);
24
+ }
25
+ }
26
+ const result = await route.execute(rest, context);
27
+ // Routed executors return an OperationResult; host adapters may hand back
28
+ // the bare payload, which is used as-is.
29
+ const isRecord = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
30
+ const wrapped = isRecord(result) && ("structuredContent" in result || "content" in result);
31
+ const structured = wrapped ? result.structuredContent : result;
32
+ const payload = isRecord(structured) ? structured : {};
33
+ const content = wrapped && Array.isArray(result.content)
34
+ ? result.content
35
+ : [{ type: "text", text: `${selector} ${String(choice)} completed` }];
36
+ return {
37
+ content,
38
+ structuredContent: { [selector]: choice, ...payload },
39
+ };
40
+ }
41
+ // implements REQ-kibi-mcp-tool-consolidation
42
+ export const SKILL_ROUTES = {
43
+ list: skillsListSpec,
44
+ load: skillsLoadSpec,
45
+ read: skillsReadSpec,
46
+ };
47
+ // implements REQ-kibi-mcp-tool-consolidation
48
+ export const MODEL_ROUTES = {
49
+ analyze: semanticAdvisorSpec,
50
+ requirement: modelRequirementSpec,
51
+ predicates: suggestPredicatesSpec,
52
+ };
53
+ // implements REQ-kibi-mcp-tool-consolidation
54
+ export const skillsSpec = {
55
+ name: "kb_skills",
56
+ cliName: "skill",
57
+ description: "Read bundled Kibi agent skills (workflow guidance). action:list returns the catalog; action:load returns a skill's metadata, Markdown body, declared resources and content hash (start with id 'kibi-usage'); action:read returns one manifest-declared resource. Read-only; does not require Prolog.",
58
+ businessInputSchema: {
59
+ type: "object",
60
+ required: ["action"],
61
+ properties: {
62
+ action: {
63
+ type: "string",
64
+ enum: ["list", "load", "read"],
65
+ description: "list, load (needs id) or read (needs id and resource).",
66
+ },
67
+ ...properties(skillsReadSpec),
68
+ },
69
+ },
70
+ requiresProlog: false,
71
+ effects: ["local-read"],
72
+ execute: (input, context) => dispatchComposite("action", SKILL_ROUTES, input, context),
73
+ };
74
+ // implements REQ-kibi-mcp-tool-consolidation
75
+ export const modelSpec = {
76
+ name: "kb_model",
77
+ cliName: "model",
78
+ description: "Turn requirement prose into checkable structure without writing the KB. mode:analyze returns the semantic advisor receipt: the clause ledger, what is grounded, what is ambiguous and suggested modeling (pass clauses for compound prose and optional typed kibi.logic.v1 interpretations). mode:requirement converts one claim (subjectKey, propertyKey, operator, value, or typed logic) into a strict-lane write set and applyPlan. mode:predicates ranks ontology predicate schemas and returns an applicable predicate-fact plan only for reviewed bindings, otherwise an ontology-gap observation. Apply returned plans with kb_upsert.",
79
+ businessInputSchema: {
80
+ type: "object",
81
+ required: ["mode", "text"],
82
+ properties: {
83
+ mode: {
84
+ type: "string",
85
+ enum: ["analyze", "requirement", "predicates"],
86
+ description: "analyze (advisor receipt), requirement (strict claim write set) or predicates (ontology predicate plan).",
87
+ },
88
+ ...properties(semanticAdvisorSpec),
89
+ ...properties(suggestPredicatesSpec),
90
+ ...properties(modelRequirementSpec),
91
+ },
92
+ },
93
+ requiresProlog: true,
94
+ effects: ["kb-read"],
95
+ execute: (input, context) => dispatchComposite("mode", MODEL_ROUTES, input, context),
96
+ };
@@ -46,7 +46,7 @@ export declare const querySpec: {
46
46
  export declare const searchSpec: {
47
47
  readonly name: "kb_search";
48
48
  readonly cliName: "search";
49
- readonly description: "Search KB entities for discovery using legacy lexical ranking or deterministic intent-v1 ranking. Intent mode accepts host-agent semantic facets and source locations, returns evidence and abstains below its confidence threshold. Use for exploratory lookup before exact follow-up with kb_query. No mutation side effects.";
49
+ readonly description: "Ask the KB a question or search it. Default intent-v1 ranking accepts questions, host-agent semantic facets and changed-code source locations, returns evidence, abstains below its confidence threshold and adds an answer layer: the current requirements that govern the topic, what must stay true (linked facts), why (ADRs) and what verifies it (scenarios, tests). Use before changing behavior, then kb_query for exact follow-up. No mutation side effects.";
50
50
  readonly businessInputSchema: {
51
51
  readonly type: "object";
52
52
  readonly required: readonly ["query"];
@@ -77,8 +77,13 @@ export declare const searchSpec: {
77
77
  readonly rankingMode: {
78
78
  readonly type: "string";
79
79
  readonly enum: readonly ["legacy", "intent-v1"];
80
- readonly default: "legacy";
81
- readonly description: "Optional deterministic ranking mode. Omit for backward-compatible lexical search; use intent-v1 for semantic facets, source-aware evidence, graph boosts, and abstention.";
80
+ readonly default: "intent-v1";
81
+ readonly description: "Optional deterministic ranking mode. Default intent-v1: question-aware ranking with semantic facets, source-aware evidence, graph boosts, superseded demotion and abstention. Use legacy for the older lexical ranking.";
82
+ };
83
+ readonly answer: {
84
+ readonly type: "boolean";
85
+ readonly default: true;
86
+ readonly description: "Intent-v1 only, first page only. When true (default) the result includes an answer layer: current governing requirements with their linked facts, scenarios, tests and ADRs, superseded requirements listed separately, and observation facts labelled as notes. Bounded in size; discovery, not proof.";
82
87
  };
83
88
  readonly semanticFacets: {
84
89
  readonly type: "object";
@@ -1 +1 @@
1
- {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,2BAA2B,CAAC;AAsBnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDsC,CAAC;AAE7D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGuC,CAAC;AAE/D,eAAO,MAAM,UAAU;;;;;;;;;;;;CAWuC,CAAC"}
1
+ {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,2BAA2B,CAAC;AAsBnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDsC,CAAC;AAE7D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0GuC,CAAC;AAE/D,eAAO,MAAM,UAAU;;;;;;;;;;;;CAWuC,CAAC"}
@@ -54,7 +54,7 @@ export const querySpec = {
54
54
  export const searchSpec = {
55
55
  name: "kb_search",
56
56
  cliName: "search",
57
- description: "Search KB entities for discovery using legacy lexical ranking or deterministic intent-v1 ranking. Intent mode accepts host-agent semantic facets and source locations, returns evidence and abstains below its confidence threshold. Use for exploratory lookup before exact follow-up with kb_query. No mutation side effects.",
57
+ description: "Ask the KB a question or search it. Default intent-v1 ranking accepts questions, host-agent semantic facets and changed-code source locations, returns evidence, abstains below its confidence threshold and adds an answer layer: the current requirements that govern the topic, what must stay true (linked facts), why (ADRs) and what verifies it (scenarios, tests). Use before changing behavior, then kb_query for exact follow-up. No mutation side effects.",
58
58
  businessInputSchema: {
59
59
  type: "object",
60
60
  required: ["query"],
@@ -85,8 +85,13 @@ export const searchSpec = {
85
85
  rankingMode: {
86
86
  type: "string",
87
87
  enum: ["legacy", "intent-v1"],
88
- default: "legacy",
89
- description: "Optional deterministic ranking mode. Omit for backward-compatible lexical search; use intent-v1 for semantic facets, source-aware evidence, graph boosts, and abstention.",
88
+ default: "intent-v1",
89
+ description: "Optional deterministic ranking mode. Default intent-v1: question-aware ranking with semantic facets, source-aware evidence, graph boosts, superseded demotion and abstention. Use legacy for the older lexical ranking.",
90
+ },
91
+ answer: {
92
+ type: "boolean",
93
+ default: true,
94
+ description: "Intent-v1 only, first page only. When true (default) the result includes an answer layer: current governing requirements with their linked facts, scenarios, tests and ADRs, superseded requirements listed separately, and observation facts labelled as notes. Bounded in size; discovery, not proof.",
90
95
  },
91
96
  semanticFacets: {
92
97
  type: "object",
@@ -40,8 +40,8 @@ export declare const modelRequirementSpec: {
40
40
  };
41
41
  readonly operator: {
42
42
  readonly type: "string";
43
- readonly enum: readonly ["eq", "gte", "lte", "neq", "bool", "polarity"];
44
- readonly description: "Optional extracted semantic claim operator. Example: 'eq'.";
43
+ readonly enum: readonly ["eq", "gt", "gte", "lt", "lte", "neq", "bool", "polarity"];
44
+ readonly description: "Optional extracted semantic claim operator. Use gt/lt for strict bounds ('greater than zero' is gt 0, not gte 0). Example: 'eq'.";
45
45
  };
46
46
  readonly value: {
47
47
  readonly description: "Optional extracted semantic claim value. Accepts string, number, or boolean.";
@@ -38,8 +38,8 @@ export const modelRequirementSpec = {
38
38
  },
39
39
  operator: {
40
40
  type: "string",
41
- enum: ["eq", "gte", "lte", "neq", "bool", "polarity"],
42
- description: "Optional extracted semantic claim operator. Example: 'eq'.",
41
+ enum: ["eq", "gt", "gte", "lt", "lte", "neq", "bool", "polarity"],
42
+ description: "Optional extracted semantic claim operator. Use gt/lt for strict bounds ('greater than zero' is gt 0, not gte 0). Example: 'eq'.",
43
43
  },
44
44
  value: {
45
45
  description: "Optional extracted semantic claim value. Accepts string, number, or boolean.",