kibi-cli 2.31.1 → 2.35.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 (302) hide show
  1. package/dist/cli-register-proof.d.ts.map +1 -1
  2. package/dist/cli-register-proof.js +19 -7
  3. package/dist/cli-register-reporting.d.ts.map +1 -1
  4. package/dist/cli-register-reporting.js +2 -0
  5. package/dist/cli.d.ts.map +1 -1
  6. package/dist/cli.js +5 -1
  7. package/dist/commands/check-generated.d.ts +5 -1
  8. package/dist/commands/check-generated.d.ts.map +1 -1
  9. package/dist/commands/check-generated.js +24 -35
  10. package/dist/commands/check.d.ts +1 -0
  11. package/dist/commands/check.d.ts.map +1 -1
  12. package/dist/commands/check.js +14 -5
  13. package/dist/commands/discovery-table.d.ts.map +1 -1
  14. package/dist/commands/discovery-table.js +51 -4
  15. package/dist/commands/doctor.js +19 -4
  16. package/dist/commands/init-helpers.d.ts.map +1 -1
  17. package/dist/commands/init-helpers.js +8 -5
  18. package/dist/commands/migrate.d.ts.map +1 -1
  19. package/dist/commands/migrate.js +109 -5
  20. package/dist/commands/prove.d.ts +48 -1
  21. package/dist/commands/prove.d.ts.map +1 -1
  22. package/dist/commands/prove.js +293 -8
  23. package/dist/commands/report.d.ts +1 -0
  24. package/dist/commands/report.d.ts.map +1 -1
  25. package/dist/commands/report.js +70 -5
  26. package/dist/commands/signoff.d.ts.map +1 -1
  27. package/dist/commands/signoff.js +20 -1
  28. package/dist/commands/sync/manifest.d.ts +10 -1
  29. package/dist/commands/sync/manifest.d.ts.map +1 -1
  30. package/dist/commands/sync/manifest.js +106 -17
  31. package/dist/commands/sync/persistence.d.ts.map +1 -1
  32. package/dist/commands/sync/persistence.js +16 -5
  33. package/dist/commands/sync.d.ts.map +1 -1
  34. package/dist/commands/sync.js +19 -0
  35. package/dist/diagnostics.js +1 -1
  36. package/dist/engine.js +1 -1
  37. package/dist/extractors/markdown.d.ts +4 -2
  38. package/dist/extractors/markdown.d.ts.map +1 -1
  39. package/dist/extractors/markdown.js +17 -0
  40. package/dist/extractors/symbol-coordinates.js +2 -2
  41. package/dist/extractors/symbols-coordinator.d.ts +2 -4
  42. package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
  43. package/dist/extractors/symbols-coordinator.js +1 -2
  44. package/dist/operations/bootstrap/candidate-helpers.d.ts +3 -0
  45. package/dist/operations/bootstrap/candidate-helpers.d.ts.map +1 -1
  46. package/dist/operations/bootstrap/candidate-helpers.js +4 -0
  47. package/dist/operations/migration/evidence-floor.d.ts +41 -0
  48. package/dist/operations/migration/evidence-floor.d.ts.map +1 -0
  49. package/dist/operations/migration/evidence-floor.js +230 -0
  50. package/dist/operations/migration/proof-contract-claims.d.ts +72 -0
  51. package/dist/operations/migration/proof-contract-claims.d.ts.map +1 -0
  52. package/dist/operations/migration/proof-contract-claims.js +215 -0
  53. package/dist/operations/migration/schema6.d.ts +6 -0
  54. package/dist/operations/migration/schema6.d.ts.map +1 -1
  55. package/dist/operations/migration/schema6.js +92 -0
  56. package/dist/operations/migration/symbol-coordinates-refresh.d.ts +3 -2
  57. package/dist/operations/migration/symbol-coordinates-refresh.d.ts.map +1 -1
  58. package/dist/operations/migration/symbol-coordinates-refresh.js +4 -3
  59. package/dist/operations/migration/untrack-symbol-coordinates.d.ts +23 -0
  60. package/dist/operations/migration/untrack-symbol-coordinates.d.ts.map +1 -0
  61. package/dist/operations/migration/untrack-symbol-coordinates.js +67 -0
  62. package/dist/operations/modeling/requirement-modeler.d.ts.map +1 -1
  63. package/dist/operations/modeling/requirement-modeler.js +48 -1
  64. package/dist/operations/modeling/requirement-types.d.ts +2 -1
  65. package/dist/operations/modeling/requirement-types.d.ts.map +1 -1
  66. package/dist/operations/modeling/requirement-utils.d.ts +1 -1
  67. package/dist/operations/modeling/requirement-utils.d.ts.map +1 -1
  68. package/dist/operations/modeling/requirement-utils.js +8 -1
  69. package/dist/operations/mutation/omitted-properties.d.ts +11 -0
  70. package/dist/operations/mutation/omitted-properties.d.ts.map +1 -0
  71. package/dist/operations/mutation/omitted-properties.js +76 -0
  72. package/dist/operations/mutation/serialization.d.ts.map +1 -1
  73. package/dist/operations/mutation/serialization.js +1 -0
  74. package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
  75. package/dist/operations/mutation/source-authoring.js +39 -20
  76. package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
  77. package/dist/operations/mutation/strict-fact.js +6 -2
  78. package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -1
  79. package/dist/operations/mutation/symbol-granularity.js +5 -3
  80. package/dist/operations/mutation/upsert.d.ts.map +1 -1
  81. package/dist/operations/mutation/upsert.js +7 -1
  82. package/dist/operations/mutation/validation.d.ts +2 -0
  83. package/dist/operations/mutation/validation.d.ts.map +1 -1
  84. package/dist/operations/mutation/validation.js +4 -0
  85. package/dist/operations/proof/claim-bindings.d.ts +41 -0
  86. package/dist/operations/proof/claim-bindings.d.ts.map +1 -0
  87. package/dist/operations/proof/claim-bindings.js +364 -0
  88. package/dist/operations/proof/code-certificates.d.ts +155 -0
  89. package/dist/operations/proof/code-certificates.d.ts.map +1 -0
  90. package/dist/operations/proof/code-certificates.js +894 -0
  91. package/dist/operations/proof/code-models.d.ts +96 -0
  92. package/dist/operations/proof/code-models.d.ts.map +1 -0
  93. package/dist/operations/proof/code-models.js +601 -0
  94. package/dist/operations/proof/code-runner.d.ts +40 -0
  95. package/dist/operations/proof/code-runner.d.ts.map +1 -0
  96. package/dist/operations/proof/code-runner.js +164 -0
  97. package/dist/operations/proof/code-scope.d.ts +14 -1
  98. package/dist/operations/proof/code-scope.d.ts.map +1 -1
  99. package/dist/operations/proof/code-scope.js +44 -2
  100. package/dist/operations/proof/compact-receipts.d.ts.map +1 -1
  101. package/dist/operations/proof/compact-receipts.js +4 -3
  102. package/dist/operations/proof/explain.d.ts +32 -0
  103. package/dist/operations/proof/explain.d.ts.map +1 -1
  104. package/dist/operations/proof/explain.js +91 -0
  105. package/dist/operations/proof/ingest-proof.d.ts +9 -1
  106. package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
  107. package/dist/operations/proof/ingest-proof.js +42 -2
  108. package/dist/operations/proof/receipt-compaction.d.ts +2 -0
  109. package/dist/operations/proof/receipt-compaction.d.ts.map +1 -1
  110. package/dist/operations/proof/receipt-compaction.js +6 -2
  111. package/dist/operations/proof/regular-language.d.ts +89 -0
  112. package/dist/operations/proof/regular-language.d.ts.map +1 -0
  113. package/dist/operations/proof/regular-language.js +943 -0
  114. package/dist/operations/proof/source-code-readers.d.ts +12 -0
  115. package/dist/operations/proof/source-code-readers.d.ts.map +1 -0
  116. package/dist/operations/proof/source-code-readers.js +699 -0
  117. package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
  118. package/dist/operations/semantic-advisor/analyze-prose.js +2 -1
  119. package/dist/operations/semantic-advisor/shared.d.ts.map +1 -1
  120. package/dist/operations/semantic-advisor/shared.js +4 -0
  121. package/dist/operations/semantic-advisor/strict-count-rules.d.ts.map +1 -1
  122. package/dist/operations/semantic-advisor/strict-count-rules.js +8 -2
  123. package/dist/operations/semantic-advisor/strict-rules.d.ts +8 -0
  124. package/dist/operations/semantic-advisor/strict-rules.d.ts.map +1 -1
  125. package/dist/operations/semantic-advisor/strict-rules.js +234 -4
  126. package/dist/operations/semantic-advisor/types.d.ts +3 -2
  127. package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
  128. package/dist/plugins/approved-source-analyzers.generated.d.ts +6 -6
  129. package/dist/plugins/approved-source-analyzers.generated.js +6 -6
  130. package/dist/prolog.d.ts.map +1 -1
  131. package/dist/prolog.js +13 -3
  132. package/dist/proof/command-test-report.d.ts +4 -3
  133. package/dist/proof/command-test-report.d.ts.map +1 -1
  134. package/dist/proof/command-test-report.js +4 -10
  135. package/dist/proof/evaluate.d.ts.map +1 -1
  136. package/dist/proof/evaluate.js +18 -2
  137. package/dist/proof/inspect.d.ts.map +1 -1
  138. package/dist/proof/inspect.js +58 -0
  139. package/dist/proof/producers/playwright-reporter.d.ts +3 -0
  140. package/dist/proof/producers/playwright-reporter.d.ts.map +1 -1
  141. package/dist/proof/producers/playwright-reporter.js +25 -2
  142. package/dist/proof/step-runner.d.ts +36 -0
  143. package/dist/proof/step-runner.d.ts.map +1 -0
  144. package/dist/proof/step-runner.js +234 -0
  145. package/dist/public/evidence-levels.d.ts +12 -0
  146. package/dist/public/evidence-levels.d.ts.map +1 -0
  147. package/dist/public/evidence-levels.js +19 -0
  148. package/dist/public/impact/coverage-depth-quality.d.ts +7 -0
  149. package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -1
  150. package/dist/public/impact/coverage-depth-quality.js +59 -0
  151. package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
  152. package/dist/public/impact/full-kb-quality.js +3 -1
  153. package/dist/public/operations/catalog.d.ts +315 -11
  154. package/dist/public/operations/catalog.d.ts.map +1 -1
  155. package/dist/public/operations/check-executor.d.ts +2 -0
  156. package/dist/public/operations/check-executor.d.ts.map +1 -1
  157. package/dist/public/operations/check-executor.js +6 -0
  158. package/dist/public/operations/evidence-floor.d.ts +48 -0
  159. package/dist/public/operations/evidence-floor.d.ts.map +1 -0
  160. package/dist/public/operations/evidence-floor.js +143 -0
  161. package/dist/public/operations/migration-plan.d.ts +19 -5
  162. package/dist/public/operations/migration-plan.d.ts.map +1 -1
  163. package/dist/public/operations/migration-plan.js +22 -5
  164. package/dist/public/operations/node-ports.d.ts.map +1 -1
  165. package/dist/public/operations/node-ports.js +4 -1
  166. package/dist/public/operations/proof-contract-claims.d.ts +26 -0
  167. package/dist/public/operations/proof-contract-claims.d.ts.map +1 -0
  168. package/dist/public/operations/proof-contract-claims.js +71 -0
  169. package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
  170. package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
  171. package/dist/public/operations/specs/check-rules.generated.js +3 -1
  172. package/dist/public/operations/specs/check.d.ts +1 -1
  173. package/dist/public/operations/specs/composite.d.ts +16 -3
  174. package/dist/public/operations/specs/composite.d.ts.map +1 -1
  175. package/dist/public/operations/specs/modeling.d.ts +16 -3
  176. package/dist/public/operations/specs/modeling.d.ts.map +1 -1
  177. package/dist/public/operations/specs/modeling.js +22 -3
  178. package/dist/public/operations/specs/mutation-schemas.d.ts +289 -7
  179. package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
  180. package/dist/public/operations/specs/mutation-schemas.js +28 -4
  181. package/dist/public/operations/specs/proof.d.ts +9 -0
  182. package/dist/public/operations/specs/proof.d.ts.map +1 -1
  183. package/dist/public/operations/specs/reporting.d.ts.map +1 -1
  184. package/dist/public/operations/specs/reporting.js +19 -10
  185. package/dist/public/operations/specs/upsert.d.ts +289 -7
  186. package/dist/public/operations/specs/upsert.d.ts.map +1 -1
  187. package/dist/public/proof-certificates.d.ts +163 -0
  188. package/dist/public/proof-certificates.d.ts.map +1 -0
  189. package/dist/public/proof-certificates.js +419 -0
  190. package/dist/public/proof-protocol.d.ts +259 -3
  191. package/dist/public/proof-protocol.d.ts.map +1 -1
  192. package/dist/public/proof-protocol.js +524 -3
  193. package/dist/public/proof-receipt.d.ts +90 -6
  194. package/dist/public/proof-receipt.d.ts.map +1 -1
  195. package/dist/public/proof-receipt.js +88 -7
  196. package/dist/public/proof-sources.d.ts +102 -0
  197. package/dist/public/proof-sources.d.ts.map +1 -0
  198. package/dist/public/proof-sources.js +1292 -0
  199. package/dist/public/schemas/entity.d.ts.map +1 -1
  200. package/dist/public/schemas/entity.js +39 -2
  201. package/dist/public/skills/kibi-bootstrap/SKILL.md +2 -2
  202. package/dist/public/skills/kibi-commit-review/SKILL.md +8 -8
  203. package/dist/public/skills/kibi-commit-review/resources/staged-gate.md +12 -7
  204. package/dist/public/skills/kibi-decisions/SKILL.md +13 -2
  205. package/dist/public/skills/kibi-decisions/resources/decision-records.md +9 -1
  206. package/dist/public/skills/kibi-freshness/SKILL.md +5 -1
  207. package/dist/public/skills/kibi-traceability/SKILL.md +12 -1
  208. package/dist/public/skills/kibi-usage/SKILL.md +8 -4
  209. package/dist/public/skills/kibi-usage/resources/proof.md +221 -20
  210. package/dist/public/skills/kibi-usage/resources/workflows.md +4 -4
  211. package/dist/report/html-report.css +83 -11
  212. package/dist/report/html-report.d.ts +8 -0
  213. package/dist/report/html-report.d.ts.map +1 -1
  214. package/dist/report/html-report.js +214 -22
  215. package/dist/report/report-view.d.ts +2 -2
  216. package/dist/report/report-view.d.ts.map +1 -1
  217. package/dist/report/report-view.js +8 -0
  218. package/dist/schemas/entity.schema.json +404 -5
  219. package/dist/search-answer.d.ts.map +1 -1
  220. package/dist/search-answer.js +1 -0
  221. package/dist/signoff/html.d.ts.map +1 -1
  222. package/dist/signoff/html.js +3 -0
  223. package/dist/signoff/markdown.d.ts.map +1 -1
  224. package/dist/signoff/markdown.js +3 -0
  225. package/dist/signoff/model.d.ts +20 -0
  226. package/dist/signoff/model.d.ts.map +1 -1
  227. package/dist/signoff/model.js +20 -1
  228. package/dist/traceability/evidence-model.d.ts +13 -12
  229. package/dist/traceability/evidence-model.d.ts.map +1 -1
  230. package/dist/traceability/evidence-model.js +1 -1
  231. package/dist/traceability/impact-knowledge.d.ts.map +1 -1
  232. package/dist/traceability/impact-knowledge.js +1 -0
  233. package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
  234. package/dist/traceability/staged-diagnostics.js +24 -20
  235. package/dist/traceability/staged-impact-contract.d.ts +4 -4
  236. package/dist/traceability/staged-impact-contract.js +9 -9
  237. package/dist/traceability/staged-symbols-manifest.d.ts +11 -3
  238. package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
  239. package/dist/traceability/staged-symbols-manifest.js +47 -140
  240. package/dist/traceability/temp-kb.d.ts.map +1 -1
  241. package/dist/traceability/temp-kb.js +1 -0
  242. package/dist/types/entities.d.ts +5 -2
  243. package/dist/types/entities.d.ts.map +1 -1
  244. package/dist/utils/merge-driver-setup.d.ts +8 -1
  245. package/dist/utils/merge-driver-setup.d.ts.map +1 -1
  246. package/dist/utils/merge-driver-setup.js +23 -2
  247. package/dist/utils/rule-registry.generated.d.ts +10 -0
  248. package/dist/utils/rule-registry.generated.d.ts.map +1 -1
  249. package/dist/utils/rule-registry.generated.js +12 -0
  250. package/dist/utils/schema-version.d.ts +1 -1
  251. package/dist/utils/schema-version.d.ts.map +1 -1
  252. package/dist/utils/schema-version.js +7 -1
  253. package/dist/utils/strict-modeling.d.ts +3 -2
  254. package/dist/utils/strict-modeling.d.ts.map +1 -1
  255. package/dist/utils/strict-modeling.js +37 -4
  256. package/dist/workspace-cwd.d.ts +15 -0
  257. package/dist/workspace-cwd.d.ts.map +1 -0
  258. package/dist/workspace-cwd.js +86 -0
  259. package/package.json +6 -2
  260. package/schema/entities.pl +6 -0
  261. package/schema/validation.pl +7 -2
  262. package/src/public/evidence-levels.ts +23 -0
  263. package/src/public/impact/coverage-depth-quality.ts +73 -0
  264. package/src/public/impact/full-kb-quality.ts +6 -1
  265. package/src/public/operations/check-executor.ts +13 -0
  266. package/src/public/operations/evidence-floor.ts +203 -0
  267. package/src/public/operations/migration-plan.ts +39 -6
  268. package/src/public/operations/node-ports.ts +3 -1
  269. package/src/public/operations/proof-contract-claims.ts +103 -0
  270. package/src/public/operations/specs/check-rules.generated.ts +3 -1
  271. package/src/public/operations/specs/modeling.ts +24 -5
  272. package/src/public/operations/specs/mutation-schemas.ts +30 -4
  273. package/src/public/operations/specs/reporting.ts +20 -10
  274. package/src/public/proof-certificates.ts +566 -0
  275. package/src/public/proof-protocol-types.d.ts +69 -1
  276. package/src/public/proof-protocol.ts +694 -3
  277. package/src/public/proof-receipt.ts +133 -7
  278. package/src/public/proof-sources.ts +1656 -0
  279. package/src/public/schemas/entity.ts +51 -3
  280. package/src/public/skills/kibi-bootstrap/SKILL.md +2 -2
  281. package/src/public/skills/kibi-commit-review/SKILL.md +8 -8
  282. package/src/public/skills/kibi-commit-review/resources/staged-gate.md +12 -7
  283. package/src/public/skills/kibi-decisions/SKILL.md +13 -2
  284. package/src/public/skills/kibi-decisions/resources/decision-records.md +9 -1
  285. package/src/public/skills/kibi-freshness/SKILL.md +5 -1
  286. package/src/public/skills/kibi-traceability/SKILL.md +12 -1
  287. package/src/public/skills/kibi-usage/SKILL.md +8 -4
  288. package/src/public/skills/kibi-usage/resources/proof.md +221 -20
  289. package/src/public/skills/kibi-usage/resources/workflows.md +4 -4
  290. package/src/schemas/entity.schema.json +404 -5
  291. package/dist/commands/proof-impact.d.ts +0 -7
  292. package/dist/commands/proof-impact.d.ts.map +0 -1
  293. package/dist/commands/proof-impact.js +0 -39
  294. package/dist/operations/proof/baseline-diff.d.ts +0 -41
  295. package/dist/operations/proof/baseline-diff.d.ts.map +0 -1
  296. package/dist/operations/proof/baseline-diff.js +0 -153
  297. package/dist/operations/proof/impact.d.ts +0 -51
  298. package/dist/operations/proof/impact.d.ts.map +0 -1
  299. package/dist/operations/proof/impact.js +0 -138
  300. package/dist/traceability/reviewed-coordinate-refresh.d.ts +0 -10
  301. package/dist/traceability/reviewed-coordinate-refresh.d.ts.map +0 -1
  302. package/dist/traceability/reviewed-coordinate-refresh.js +0 -49
@@ -523,6 +523,16 @@
523
523
  ],
524
524
  "description": "Requirement and ADR only. How firmly the decision was made. firm: a human stated it as a rule; it needs a ref (origin.ref, or approval_ref on a requirement) to their words, and only a human may change it. default: a delegated or agent choice; a later agent may supersede it with evidence. exploratory: a flagged guess, expected to be revisited. When absent, it reads as default if an agent wrote the entity (origin.kind agent) and as firm otherwise (a person's, imported or migrated decision); set it explicitly when recording a decision."
525
525
  },
526
+ "required_evidence": {
527
+ "type": "string",
528
+ "enum": [
529
+ "proved",
530
+ "tested",
531
+ "asserted",
532
+ "unverified"
533
+ ],
534
+ "description": "Requirement-only. The weakest evidence level this current requirement accepts; the evidence-floor check rule fails while its computed evidence level is lower. proved: a re-checkable certificate covers every case. tested: fresh passing E2E receipts cover every linked scenario. asserted: a person stands behind it. unverified: no floor. When absent, it is tested for a firm requirement and unverified otherwise."
535
+ },
526
536
  "expects": {
527
537
  "type": "string",
528
538
  "enum": [
@@ -762,8 +772,286 @@
762
772
  "success_policy": {
763
773
  "type": "string",
764
774
  "enum": [
765
- "all_required_first_attempt"
775
+ "all_required_first_attempt",
776
+ "own_results_first_attempt"
766
777
  ]
778
+ },
779
+ "kind": {
780
+ "type": "string",
781
+ "enum": [
782
+ "e2e",
783
+ "example",
784
+ "property",
785
+ "exhaustive",
786
+ "typecheck",
787
+ "arithmetic",
788
+ "smt",
789
+ "rule",
790
+ "state_machine",
791
+ "regex",
792
+ "source"
793
+ ],
794
+ "description": "What the checker establishes; absent means e2e. exhaustive, typecheck, arithmetic, smt, rule, state_machine and regex must leave a kibi.code-certificate.v1 that Kibi re-checks before the receipt counts as proved. source reads the contract's source itself: the run may leave {version, kind: source, test_id, source} or nothing, and Kibi stores its own read as the certificate."
795
+ },
796
+ "source": {
797
+ "type": "object",
798
+ "description": "source: the project source a source proof reads. A project source Kibi reads by itself. reader json or yaml: {file, path?, select?: keys|values|items}. glob: {pattern, capture?, ignore?} (capture true reads what each * matched). openapi: {file, select?: operations|unsecured_operations|security_schemes|responses}. references: {files, extract: env|imports|calls|string_args|thrown|property, callee?, key?, ignore?}. schema: {format: drizzle|prisma|sql, file (drizzle, prisma) or files (sql migrations), exports?, table?, select?: tables|columns|required_columns|nullable_columns|foreign_keys}. routes: {file, export, framework?: hono|express, path_prefix?, names_from?, select?: routes|middleware}. validator: {file, export, select?: fields|required_fields|optional_fields}. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.",
799
+ "required": [
800
+ "reader"
801
+ ],
802
+ "properties": {
803
+ "reader": {
804
+ "type": "string",
805
+ "enum": [
806
+ "json",
807
+ "yaml",
808
+ "glob",
809
+ "openapi",
810
+ "references",
811
+ "schema",
812
+ "routes",
813
+ "validator"
814
+ ]
815
+ }
816
+ },
817
+ "additionalProperties": true
818
+ },
819
+ "domain_source": {
820
+ "type": "object",
821
+ "description": "exhaustive and typecheck: the symbol that defines the finite domain (typecheck: also the type whose fields a required_fields fact names). state_machine: the transition table or next-state function. The proof must import it from its source file; a hand-listed domain downgrades the receipt to example. Kibi reads the export named `export`, or the symbol's title when `export` is absent.",
822
+ "required": [
823
+ "symbol_id"
824
+ ],
825
+ "properties": {
826
+ "symbol_id": {
827
+ "type": "string",
828
+ "minLength": 1
829
+ },
830
+ "export": {
831
+ "type": "string",
832
+ "minLength": 1,
833
+ "description": "The name the domain is exported under in the symbol's source file, when the symbol's title is not that name."
834
+ }
835
+ },
836
+ "additionalProperties": false
837
+ },
838
+ "witness": {
839
+ "type": "object",
840
+ "description": "typecheck: the repository-relative witness file Kibi compiles (an exhaustive switch ending in never, or a mapped type over the domain).",
841
+ "required": [
842
+ "path"
843
+ ],
844
+ "properties": {
845
+ "path": {
846
+ "type": "string",
847
+ "minLength": 1
848
+ }
849
+ },
850
+ "additionalProperties": false
851
+ },
852
+ "proves": {
853
+ "type": "array",
854
+ "description": "Certificate kinds: the requirement claim keys (CLAIM-...) this certificate proves. Each must be a modeled claim of a current requirement the test reaches through its scenarios. Kibi derives what the certificate must establish from the claim's grounding fact (a set fact for exhaustive or typecheck, a numeric fact for arithmetic or smt, a rule, predicate or set fact for rule and state_machine, a string fact for regex); a claim with no such derivation is only attested and never counts as proved.",
855
+ "minItems": 1,
856
+ "items": {
857
+ "type": "string",
858
+ "pattern": "^CLAIM-"
859
+ },
860
+ "uniqueItems": true
861
+ },
862
+ "value_source": {
863
+ "type": "array",
864
+ "description": "arithmetic and smt: code constants the assumptions read. Kibi evaluates each export at ingest and requires the certificate to assume the variable equals that value, so the proof is about the code and not only the knowledge base. With measure count the value is the size of a list, set, map or object export, so a count claim reads the collection itself. An entry {source, measure: count} counts the members Kibi reads from a project source (routes, tables, environment variables).",
865
+ "minItems": 1,
866
+ "items": {
867
+ "type": "object",
868
+ "properties": {
869
+ "symbol_id": {
870
+ "type": "string",
871
+ "minLength": 1
872
+ },
873
+ "export": {
874
+ "type": "string",
875
+ "minLength": 1
876
+ },
877
+ "source": {
878
+ "type": "object",
879
+ "description": "A project source Kibi reads by itself. reader json or yaml: {file, path?, select?: keys|values|items}. glob: {pattern, capture?, ignore?} (capture true reads what each * matched). openapi: {file, select?: operations|unsecured_operations|security_schemes|responses}. references: {files, extract: env|imports|calls|string_args|thrown|property, callee?, key?, ignore?}. schema: {format: drizzle|prisma|sql, file (drizzle, prisma) or files (sql migrations), exports?, table?, select?: tables|columns|required_columns|nullable_columns|foreign_keys}. routes: {file, export, framework?: hono|express, path_prefix?, names_from?, select?: routes|middleware}. validator: {file, export, select?: fields|required_fields|optional_fields}. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.",
880
+ "required": [
881
+ "reader"
882
+ ],
883
+ "properties": {
884
+ "reader": {
885
+ "type": "string",
886
+ "enum": [
887
+ "json",
888
+ "yaml",
889
+ "glob",
890
+ "openapi",
891
+ "references",
892
+ "schema",
893
+ "routes",
894
+ "validator"
895
+ ]
896
+ }
897
+ },
898
+ "additionalProperties": true
899
+ },
900
+ "measure": {
901
+ "type": "string",
902
+ "enum": [
903
+ "value",
904
+ "count"
905
+ ],
906
+ "description": "value (default for an export): the export is a number. count (the only measure of a source): the number of members of a list, set, map or object export, or of a source."
907
+ }
908
+ },
909
+ "additionalProperties": false
910
+ }
911
+ },
912
+ "predicate_source": {
913
+ "type": "object",
914
+ "description": "rule: the code function behind each predicate a claim's rule, predicate or set fact names, keyed by predicate name. Each export takes the predicate's arguments in order and returns a boolean; Kibi calls it on every combination of its argument domains.",
915
+ "minProperties": 1,
916
+ "additionalProperties": {
917
+ "type": "object",
918
+ "required": [
919
+ "symbol_id"
920
+ ],
921
+ "properties": {
922
+ "symbol_id": {
923
+ "type": "string",
924
+ "minLength": 1
925
+ },
926
+ "export": {
927
+ "type": "string",
928
+ "minLength": 1,
929
+ "description": "The exported function's name in the symbol's source file. Without it Kibi reads the export named by the symbol's title."
930
+ },
931
+ "harness_for": {
932
+ "type": "array",
933
+ "minItems": 1,
934
+ "items": {
935
+ "type": "string",
936
+ "minLength": 1
937
+ },
938
+ "description": "The predicate is a test harness that decides the predicate by driving these code symbols (for example by calling the handler with each role). The symbols must be covered_by the test; a claim the harness proves is bound with scope harness."
939
+ }
940
+ },
941
+ "additionalProperties": false
942
+ }
943
+ },
944
+ "domains": {
945
+ "type": "object",
946
+ "description": "rule: the finite domain of each argument type, keyed by type name (an array, Set, Map or object export, or a Python list, set, dict or Enum), or {source} for the members Kibi reads from a project source (every route, every table, every environment variable). state_machine with a next-state function: the `state` and `event` domains it is called on.",
947
+ "minProperties": 1,
948
+ "additionalProperties": {
949
+ "anyOf": [
950
+ {
951
+ "type": "object",
952
+ "required": [
953
+ "symbol_id"
954
+ ],
955
+ "properties": {
956
+ "symbol_id": {
957
+ "type": "string",
958
+ "minLength": 1
959
+ },
960
+ "export": {
961
+ "type": "string",
962
+ "minLength": 1
963
+ }
964
+ },
965
+ "additionalProperties": false
966
+ },
967
+ {
968
+ "type": "object",
969
+ "required": [
970
+ "source"
971
+ ],
972
+ "properties": {
973
+ "source": {
974
+ "type": "object",
975
+ "description": "A project source Kibi reads by itself. reader json or yaml: {file, path?, select?: keys|values|items}. glob: {pattern, capture?, ignore?} (capture true reads what each * matched). openapi: {file, select?: operations|unsecured_operations|security_schemes|responses}. references: {files, extract: env|imports|calls|string_args|thrown|property, callee?, key?, ignore?}. schema: {format: drizzle|prisma|sql, file (drizzle, prisma) or files (sql migrations), exports?, table?, select?: tables|columns|required_columns|nullable_columns|foreign_keys}. routes: {file, export, framework?: hono|express, path_prefix?, names_from?, select?: routes|middleware}. validator: {file, export, select?: fields|required_fields|optional_fields}. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.",
976
+ "required": [
977
+ "reader"
978
+ ],
979
+ "properties": {
980
+ "reader": {
981
+ "type": "string",
982
+ "enum": [
983
+ "json",
984
+ "yaml",
985
+ "glob",
986
+ "openapi",
987
+ "references",
988
+ "schema",
989
+ "routes",
990
+ "validator"
991
+ ]
992
+ }
993
+ },
994
+ "additionalProperties": true
995
+ }
996
+ },
997
+ "additionalProperties": false
998
+ }
999
+ ]
1000
+ }
1001
+ },
1002
+ "initial_source": {
1003
+ "type": "object",
1004
+ "required": [
1005
+ "symbol_id"
1006
+ ],
1007
+ "properties": {
1008
+ "symbol_id": {
1009
+ "type": "string",
1010
+ "minLength": 1
1011
+ },
1012
+ "export": {
1013
+ "type": "string",
1014
+ "minLength": 1
1015
+ }
1016
+ },
1017
+ "additionalProperties": false,
1018
+ "description": "state_machine: the export holding the initial state (or states), needed for initial_states and reachable_states facts."
1019
+ },
1020
+ "pattern_source": {
1021
+ "type": "object",
1022
+ "required": [
1023
+ "symbol_id"
1024
+ ],
1025
+ "properties": {
1026
+ "symbol_id": {
1027
+ "type": "string",
1028
+ "minLength": 1
1029
+ },
1030
+ "export": {
1031
+ "type": "string",
1032
+ "minLength": 1
1033
+ }
1034
+ },
1035
+ "additionalProperties": false,
1036
+ "description": "regex: the export holding the code's pattern (a RegExp, or a Python re.Pattern) or string constant that a string fact is about."
1037
+ },
1038
+ "constraint_source": {
1039
+ "type": "object",
1040
+ "description": "arithmetic and smt: the typed numeric property_value facts the certificate's assumptions come from. Kibi checks the assumptions (or the query's assertions) are exactly these facts' constraints, so the proof is about the knowledge base, not numbers the test chose.",
1041
+ "required": [
1042
+ "fact_ids"
1043
+ ],
1044
+ "properties": {
1045
+ "fact_ids": {
1046
+ "type": "array",
1047
+ "minItems": 1,
1048
+ "items": {
1049
+ "type": "string",
1050
+ "minLength": 1
1051
+ }
1052
+ }
1053
+ },
1054
+ "additionalProperties": false
767
1055
  }
768
1056
  },
769
1057
  "additionalProperties": false
@@ -813,7 +1101,7 @@
813
1101
  "type": "array",
814
1102
  "items": {
815
1103
  "type": "object",
816
- "description": "Kibi-derived kibi.proof-receipt.v1. Receipts are never caller-authored; kb_ingest_proof derives them from kibi.proof-run.v1 artifacts.",
1104
+ "description": "Kibi-derived kibi.proof-receipt.v2 (kibi.proof-receipt.v1 entries are still read). Receipts are never caller-authored; kb_ingest_proof derives them from kibi.proof-run.v1 artifacts.",
817
1105
  "required": [
818
1106
  "version",
819
1107
  "receipt_id",
@@ -837,7 +1125,10 @@
837
1125
  "properties": {
838
1126
  "version": {
839
1127
  "type": "string",
840
- "const": "kibi.proof-receipt.v1"
1128
+ "enum": [
1129
+ "kibi.proof-receipt.v1",
1130
+ "kibi.proof-receipt.v2"
1131
+ ]
841
1132
  },
842
1133
  "receipt_id": {
843
1134
  "type": "string",
@@ -1080,6 +1371,90 @@
1080
1371
  "additionalProperties": false
1081
1372
  }
1082
1373
  },
1374
+ "kind": {
1375
+ "type": "string",
1376
+ "enum": [
1377
+ "e2e",
1378
+ "example",
1379
+ "property",
1380
+ "exhaustive",
1381
+ "typecheck",
1382
+ "arithmetic",
1383
+ "smt",
1384
+ "rule",
1385
+ "state_machine",
1386
+ "regex",
1387
+ "source"
1388
+ ]
1389
+ },
1390
+ "evidence_level": {
1391
+ "type": "string",
1392
+ "enum": [
1393
+ "proved",
1394
+ "tested"
1395
+ ]
1396
+ },
1397
+ "certificate": {
1398
+ "type": "object"
1399
+ },
1400
+ "certificate_digest": {
1401
+ "type": "string",
1402
+ "pattern": "^[a-f0-9]{64}$"
1403
+ },
1404
+ "certificate_rejection": {
1405
+ "type": "string",
1406
+ "minLength": 1
1407
+ },
1408
+ "claim_bindings": {
1409
+ "type": "array",
1410
+ "description": "Certificate kinds: how the certificate binds to each claim its contract names in proves, judged at ingest. derived means Kibi derived the certificate's obligation from the claim's grounding fact and the certificate satisfies it; attested means no derivation exists and the author vouches for it (never proved); rejected names why.",
1411
+ "items": {
1412
+ "type": "object",
1413
+ "required": [
1414
+ "claim_key",
1415
+ "binding"
1416
+ ],
1417
+ "properties": {
1418
+ "claim_key": {
1419
+ "type": "string",
1420
+ "minLength": 1
1421
+ },
1422
+ "requirement_id": {
1423
+ "type": "string",
1424
+ "minLength": 1
1425
+ },
1426
+ "fact_id": {
1427
+ "type": "string",
1428
+ "minLength": 1
1429
+ },
1430
+ "binding": {
1431
+ "type": "string",
1432
+ "enum": [
1433
+ "derived",
1434
+ "attested",
1435
+ "rejected"
1436
+ ]
1437
+ },
1438
+ "scope": {
1439
+ "type": "string",
1440
+ "enum": [
1441
+ "code",
1442
+ "source",
1443
+ "harness",
1444
+ "intent"
1445
+ ]
1446
+ },
1447
+ "obligation": {
1448
+ "type": "object"
1449
+ },
1450
+ "reason": {
1451
+ "type": "string",
1452
+ "minLength": 1
1453
+ }
1454
+ },
1455
+ "additionalProperties": false
1456
+ }
1457
+ },
1083
1458
  "gaps": {
1084
1459
  "type": "array",
1085
1460
  "items": {
@@ -1150,7 +1525,11 @@
1150
1525
  "lt",
1151
1526
  "lte",
1152
1527
  "gt",
1153
- "gte"
1528
+ "gte",
1529
+ "matches",
1530
+ "includes",
1531
+ "subset_of",
1532
+ "excludes"
1154
1533
  ]
1155
1534
  },
1156
1535
  "value_type": {
@@ -1159,12 +1538,22 @@
1159
1538
  "string",
1160
1539
  "int",
1161
1540
  "number",
1162
- "bool"
1541
+ "bool",
1542
+ "set"
1163
1543
  ]
1164
1544
  },
1165
1545
  "value_string": {
1166
1546
  "type": "string"
1167
1547
  },
1548
+ "value_set": {
1549
+ "type": "array",
1550
+ "items": {
1551
+ "type": "string",
1552
+ "minLength": 1
1553
+ },
1554
+ "minItems": 1,
1555
+ "uniqueItems": true
1556
+ },
1168
1557
  "value_int": {
1169
1558
  "type": "integer"
1170
1559
  },
@@ -1395,6 +1784,11 @@
1395
1784
  "value_bool"
1396
1785
  ]
1397
1786
  },
1787
+ {
1788
+ "required": [
1789
+ "value_set"
1790
+ ]
1791
+ },
1398
1792
  {
1399
1793
  "required": [
1400
1794
  "unit"
@@ -1661,6 +2055,11 @@
1661
2055
  "required": [
1662
2056
  "exempts_claims"
1663
2057
  ]
2058
+ },
2059
+ {
2060
+ "required": [
2061
+ "required_evidence"
2062
+ ]
1664
2063
  }
1665
2064
  ]
1666
2065
  }
@@ -1,7 +0,0 @@
1
- export type ProofImpactOptions = Readonly<{
2
- json?: boolean;
3
- }>;
4
- export declare function proofImpactCommand(options: ProofImpactOptions): Promise<{
5
- exitCode: number;
6
- }>;
7
- //# sourceMappingURL=proof-impact.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proof-impact.d.ts","sourceRoot":"","sources":["../../src/commands/proof-impact.ts"],"names":[],"mappings":"AAiBA,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC,CAAC;AAGH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CA8B/B"}
@@ -1,39 +0,0 @@
1
- /*
2
- Kibi — repo-local, per-branch, queryable long-term memory for software projects
3
- Copyright (C) 2026 Piotr Franczyk
4
-
5
- This program is free software: you can redistribute it and/or modify
6
- it under the terms of the GNU Affero General Public License as published by
7
- the Free Software Foundation, either version 3 of the License, or
8
- (at your option) any later version.
9
- */
10
- import { executeProofImpact, proofImpactExitCode, } from "../operations/proof/impact.js";
11
- import { createCliRuntime } from "../runtime/cli-runtime.js";
12
- // implements REQ-kibi-verification-evidence-contract
13
- export async function proofImpactCommand(options) {
14
- const runtime = createCliRuntime();
15
- const context = await runtime.open({
16
- name: "kibi_proof_impact",
17
- effects: [],
18
- requiresProlog: true,
19
- execute: async () => undefined,
20
- }, {});
21
- let completed = false;
22
- try {
23
- const { result, text } = await executeProofImpact(context);
24
- if (options.json) {
25
- process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
26
- }
27
- else {
28
- process.stdout.write(text);
29
- }
30
- completed = true;
31
- await runtime.afterSuccess({ name: "kibi_proof_impact" }, context);
32
- return { exitCode: proofImpactExitCode(result) };
33
- }
34
- finally {
35
- await runtime.close(context, completed
36
- ? { status: "success", result: 0 }
37
- : { status: "error", error: 1 });
38
- }
39
- }
@@ -1,41 +0,0 @@
1
- export declare const PROOF_BASELINE_VERSION = "kibi.proof-baseline.v3";
2
- export type RequirementFingerprint = {
3
- readonly proofStatus: string;
4
- readonly gaps: readonly string[];
5
- readonly uncoveredSymbols: readonly string[];
6
- };
7
- export type RequirementFingerprints = Readonly<Record<string, RequirementFingerprint>>;
8
- export type CoverageRowLike = {
9
- readonly id?: unknown;
10
- readonly proofStatus?: unknown;
11
- readonly proofGaps?: unknown;
12
- readonly proofStages?: {
13
- readonly productionSymbols?: {
14
- readonly uncoveredSymbols?: unknown;
15
- readonly explanations?: unknown;
16
- };
17
- };
18
- };
19
- export type FingerprintChange = {
20
- readonly id: string;
21
- readonly kind: "added" | "removed" | "changed";
22
- readonly before?: RequirementFingerprint;
23
- readonly after?: RequirementFingerprint;
24
- };
25
- export declare function fingerprintRequirements(rows: readonly CoverageRowLike[]): RequirementFingerprints;
26
- export declare function diffFingerprints(baseline: RequirementFingerprints | undefined, current: RequirementFingerprints): FingerprintChange[];
27
- type ExplanationLike = {
28
- readonly symbolId?: unknown;
29
- readonly reason?: unknown;
30
- readonly coverageCandidates?: unknown;
31
- };
32
- export declare function explanationsForRequirement(rows: readonly CoverageRowLike[], requirementId: string): readonly ExplanationLike[];
33
- export declare function renderRequirementDiffs(changes: readonly FingerprintChange[], rows?: readonly CoverageRowLike[]): string;
34
- export declare function parseSpawnJson(result: {
35
- readonly error?: unknown;
36
- readonly status?: number | null;
37
- readonly stdout?: string | null;
38
- readonly stderr?: string | null;
39
- }): unknown;
40
- export {};
41
- //# sourceMappingURL=baseline-diff.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"baseline-diff.d.ts","sourceRoot":"","sources":["../../../src/operations/proof/baseline-diff.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAE/D,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAC5C,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CACvC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE;QACrB,QAAQ,CAAC,iBAAiB,CAAC,EAAE;YAC3B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;YACpC,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;SACjC,CAAC;KACH,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,MAAM,CAAC,EAAE,sBAAsB,CAAC;IACzC,QAAQ,CAAC,KAAK,CAAC,EAAE,sBAAsB,CAAC;CACzC,CAAC;AAUF,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,SAAS,eAAe,EAAE,GAC/B,uBAAuB,CAgBzB;AAGD,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,uBAAuB,GAAG,SAAS,EAC7C,OAAO,EAAE,uBAAuB,GAC/B,iBAAiB,EAAE,CA4BrB;AASD,KAAK,eAAe,GAAG;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,SAAS,eAAe,EAAE,EAChC,aAAa,EAAE,MAAM,GACpB,SAAS,eAAe,EAAE,CAM5B;AAgBD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,SAAS,iBAAiB,EAAE,EACrC,IAAI,GAAE,SAAS,eAAe,EAAO,GACpC,MAAM,CAwDR;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,GAAG,OAAO,CAYV"}