kibi-cli 2.38.0 → 2.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/dist/cli-json-command.d.ts.map +1 -1
  2. package/dist/cli-json-command.js +4 -0
  3. package/dist/cli-register-foundation.js +2 -2
  4. package/dist/cli-register-reporting.d.ts.map +1 -1
  5. package/dist/cli-register-reporting.js +1 -0
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +3 -0
  8. package/dist/commands/check.d.ts.map +1 -1
  9. package/dist/commands/check.js +33 -9
  10. package/dist/commands/coverage.d.ts +1 -0
  11. package/dist/commands/coverage.d.ts.map +1 -1
  12. package/dist/commands/coverage.js +40 -0
  13. package/dist/commands/doctor.d.ts +5 -0
  14. package/dist/commands/doctor.d.ts.map +1 -1
  15. package/dist/commands/doctor.js +29 -0
  16. package/dist/commands/init.d.ts.map +1 -1
  17. package/dist/commands/init.js +4 -0
  18. package/dist/commands/migrate-plan-record.d.ts +18 -0
  19. package/dist/commands/migrate-plan-record.d.ts.map +1 -0
  20. package/dist/commands/migrate-plan-record.js +112 -0
  21. package/dist/commands/migrate.d.ts +11 -2
  22. package/dist/commands/migrate.d.ts.map +1 -1
  23. package/dist/commands/migrate.js +60 -8
  24. package/dist/commands/prove.d.ts.map +1 -1
  25. package/dist/commands/prove.js +18 -3
  26. package/dist/commands/sync/manifest.d.ts.map +1 -1
  27. package/dist/commands/sync/manifest.js +17 -4
  28. package/dist/commands/sync/persistence.d.ts.map +1 -1
  29. package/dist/commands/sync/persistence.js +6 -0
  30. package/dist/commands/sync.d.ts.map +1 -1
  31. package/dist/commands/sync.js +8 -0
  32. package/dist/commands/telemetry.d.ts.map +1 -1
  33. package/dist/commands/telemetry.js +12 -2
  34. package/dist/extractors/markdown.d.ts +6 -0
  35. package/dist/extractors/markdown.d.ts.map +1 -1
  36. package/dist/extractors/markdown.js +21 -0
  37. package/dist/extractors/symbol-title-match.d.ts +31 -0
  38. package/dist/extractors/symbol-title-match.d.ts.map +1 -0
  39. package/dist/extractors/symbol-title-match.js +133 -0
  40. package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
  41. package/dist/extractors/symbols-coordinator.js +81 -12
  42. package/dist/operations/bootstrap/discovery-evidence.d.ts.map +1 -1
  43. package/dist/operations/bootstrap/discovery-evidence.js +44 -2
  44. package/dist/operations/bootstrap/discovery.d.ts.map +1 -1
  45. package/dist/operations/bootstrap/discovery.js +1 -0
  46. package/dist/operations/bootstrap/guidance-actions.d.ts.map +1 -1
  47. package/dist/operations/bootstrap/guidance-actions.js +12 -1
  48. package/dist/operations/bootstrap/plugin-offers.d.ts +7 -1
  49. package/dist/operations/bootstrap/plugin-offers.d.ts.map +1 -1
  50. package/dist/operations/bootstrap/plugin-offers.js +73 -3
  51. package/dist/operations/modeling/logic-modeling.d.ts.map +1 -1
  52. package/dist/operations/modeling/logic-modeling.js +2 -1
  53. package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
  54. package/dist/operations/modeling/model-requirement.js +2 -1
  55. package/dist/operations/mutation/symbol-refresh.d.ts +2 -0
  56. package/dist/operations/mutation/symbol-refresh.d.ts.map +1 -1
  57. package/dist/operations/mutation/symbol-refresh.js +6 -1
  58. package/dist/operations/mutation/upsert.d.ts.map +1 -1
  59. package/dist/operations/mutation/upsert.js +7 -0
  60. package/dist/operations/planning/compile-intent.d.ts.map +1 -1
  61. package/dist/operations/planning/compile-intent.js +2 -1
  62. package/dist/operations/proof/claim-bindings.d.ts +11 -0
  63. package/dist/operations/proof/claim-bindings.d.ts.map +1 -1
  64. package/dist/operations/proof/claim-bindings.js +144 -1
  65. package/dist/operations/proof/code-certificates.d.ts +10 -3
  66. package/dist/operations/proof/code-certificates.d.ts.map +1 -1
  67. package/dist/operations/proof/code-certificates.js +65 -13
  68. package/dist/operations/proof/code-languages.d.ts +104 -0
  69. package/dist/operations/proof/code-languages.d.ts.map +1 -0
  70. package/dist/operations/proof/code-languages.js +119 -0
  71. package/dist/operations/proof/code-models.d.ts +2 -0
  72. package/dist/operations/proof/code-models.d.ts.map +1 -1
  73. package/dist/operations/proof/code-models.js +11 -5
  74. package/dist/operations/proof/code-runner.d.ts +12 -9
  75. package/dist/operations/proof/code-runner.d.ts.map +1 -1
  76. package/dist/operations/proof/code-runner.js +81 -38
  77. package/dist/operations/proof/code-scope.d.ts +8 -0
  78. package/dist/operations/proof/code-scope.d.ts.map +1 -1
  79. package/dist/operations/proof/code-scope.js +30 -1
  80. package/dist/operations/proof/explain.d.ts +76 -0
  81. package/dist/operations/proof/explain.d.ts.map +1 -1
  82. package/dist/operations/proof/explain.js +228 -0
  83. package/dist/operations/proof/ingest-proof.d.ts +2 -0
  84. package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
  85. package/dist/operations/proof/ingest-proof.js +1 -0
  86. package/dist/operations/proof/java-package-shadow.d.ts +14 -0
  87. package/dist/operations/proof/java-package-shadow.d.ts.map +1 -0
  88. package/dist/operations/proof/java-package-shadow.js +389 -0
  89. package/dist/operations/proof/prolog-evaluator.d.ts +14 -0
  90. package/dist/operations/proof/prolog-evaluator.d.ts.map +1 -0
  91. package/dist/operations/proof/prolog-evaluator.js +247 -0
  92. package/dist/operations/proof/prolog-source-reader.d.ts +20 -0
  93. package/dist/operations/proof/prolog-source-reader.d.ts.map +1 -0
  94. package/dist/operations/proof/prolog-source-reader.js +1123 -0
  95. package/dist/operations/proof/source-code-readers.d.ts +6 -0
  96. package/dist/operations/proof/source-code-readers.d.ts.map +1 -1
  97. package/dist/operations/proof/source-code-readers.js +879 -75
  98. package/dist/operations/semantic-advisor/analyze-prose.d.ts +9 -1
  99. package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
  100. package/dist/operations/semantic-advisor/analyze-prose.js +21 -0
  101. package/dist/operations/semantic-advisor/case-preview.d.ts +24 -0
  102. package/dist/operations/semantic-advisor/case-preview.d.ts.map +1 -0
  103. package/dist/operations/semantic-advisor/case-preview.js +216 -0
  104. package/dist/operations/semantic-advisor/shared.d.ts.map +1 -1
  105. package/dist/operations/semantic-advisor/shared.js +3 -0
  106. package/dist/operations/semantic-advisor/types.d.ts +23 -0
  107. package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
  108. package/dist/plugins/approved-source-analyzers.generated.d.ts +15 -34
  109. package/dist/plugins/approved-source-analyzers.generated.d.ts.map +1 -1
  110. package/dist/plugins/approved-source-analyzers.generated.js +15 -34
  111. package/dist/plugins/plugin-install-check.d.ts +21 -0
  112. package/dist/plugins/plugin-install-check.d.ts.map +1 -0
  113. package/dist/plugins/plugin-install-check.js +62 -0
  114. package/dist/plugins/proof-reference-extractors.d.ts +20 -0
  115. package/dist/plugins/proof-reference-extractors.d.ts.map +1 -0
  116. package/dist/plugins/proof-reference-extractors.js +104 -0
  117. package/dist/plugins/reference-language-suggestion.d.ts +51 -0
  118. package/dist/plugins/reference-language-suggestion.d.ts.map +1 -0
  119. package/dist/plugins/reference-language-suggestion.js +277 -0
  120. package/dist/plugins/registry.d.ts.map +1 -1
  121. package/dist/plugins/registry.js +3 -1
  122. package/dist/plugins/source-analysis-service.d.ts.map +1 -1
  123. package/dist/plugins/source-analysis-service.js +4 -0
  124. package/dist/plugins/source-change-analysis.d.ts +26 -1
  125. package/dist/plugins/source-change-analysis.d.ts.map +1 -1
  126. package/dist/plugins/source-change-analysis.js +77 -5
  127. package/dist/plugins/source-classification.d.ts +2 -2
  128. package/dist/plugins/source-classification.d.ts.map +1 -1
  129. package/dist/plugins/source-classification.js +45 -1
  130. package/dist/public/operations/catalog.d.ts +62 -7
  131. package/dist/public/operations/catalog.d.ts.map +1 -1
  132. package/dist/public/operations/check-executor.d.ts.map +1 -1
  133. package/dist/public/operations/check-executor.js +3 -0
  134. package/dist/public/operations/evidence-floor.d.ts +8 -0
  135. package/dist/public/operations/evidence-floor.d.ts.map +1 -1
  136. package/dist/public/operations/evidence-floor.js +19 -1
  137. package/dist/public/operations/repair-plan.d.ts +46 -0
  138. package/dist/public/operations/repair-plan.d.ts.map +1 -1
  139. package/dist/public/operations/repair-plan.js +110 -1
  140. package/dist/public/operations/schema6-check-actions.js +1 -1
  141. package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
  142. package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
  143. package/dist/public/operations/specs/check-rules.generated.js +3 -1
  144. package/dist/public/operations/specs/check.d.ts +1 -1
  145. package/dist/public/operations/specs/mutation-schemas.d.ts +61 -6
  146. package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
  147. package/dist/public/operations/specs/mutation-schemas.js +30 -0
  148. package/dist/public/operations/specs/reporting.d.ts +8 -0
  149. package/dist/public/operations/specs/reporting.d.ts.map +1 -1
  150. package/dist/public/operations/specs/reporting.js +26 -3
  151. package/dist/public/operations/specs/semantic.d.ts.map +1 -1
  152. package/dist/public/operations/specs/semantic.js +2 -1
  153. package/dist/public/operations/specs/upsert.d.ts +61 -6
  154. package/dist/public/operations/specs/upsert.d.ts.map +1 -1
  155. package/dist/public/operations/symbol-coordinates-check.d.ts +11 -0
  156. package/dist/public/operations/symbol-coordinates-check.d.ts.map +1 -0
  157. package/dist/public/operations/symbol-coordinates-check.js +66 -0
  158. package/dist/public/proof-protocol.d.ts +31 -6
  159. package/dist/public/proof-protocol.d.ts.map +1 -1
  160. package/dist/public/proof-protocol.js +45 -15
  161. package/dist/public/proof-sources.d.ts +4 -2
  162. package/dist/public/proof-sources.d.ts.map +1 -1
  163. package/dist/public/proof-sources.js +43 -4
  164. package/dist/public/schemas/entity.d.ts.map +1 -1
  165. package/dist/public/schemas/entity.js +59 -0
  166. package/dist/public/skills/kibi-commit-review/SKILL.md +6 -2
  167. package/dist/public/skills/kibi-decisions/SKILL.md +7 -2
  168. package/dist/public/skills/kibi-decisions/resources/signoff-views.md +3 -1
  169. package/dist/public/skills/kibi-usage/SKILL.md +14 -3
  170. package/dist/public/skills/kibi-usage/resources/prolog-proofs.md +207 -0
  171. package/dist/public/skills/kibi-usage/resources/proof.md +44 -3
  172. package/dist/schemas/entity.schema.json +126 -6
  173. package/dist/search-answer.d.ts +3 -2
  174. package/dist/search-answer.d.ts.map +1 -1
  175. package/dist/search-answer.js +56 -3
  176. package/dist/traceability/analysis-gate.d.ts +3 -1
  177. package/dist/traceability/analysis-gate.d.ts.map +1 -1
  178. package/dist/traceability/analysis-gate.js +9 -1
  179. package/dist/traceability/impact-knowledge.d.ts.map +1 -1
  180. package/dist/traceability/impact-knowledge.js +2 -0
  181. package/dist/traceability/staged-file-coverage.d.ts.map +1 -1
  182. package/dist/traceability/staged-file-coverage.js +7 -2
  183. package/dist/traceability/symbol-extract.d.ts +17 -0
  184. package/dist/traceability/symbol-extract.d.ts.map +1 -1
  185. package/dist/traceability/symbol-extract.js +69 -15
  186. package/dist/traceability/temp-kb.d.ts.map +1 -1
  187. package/dist/traceability/temp-kb.js +11 -1
  188. package/dist/traceability/validate.d.ts.map +1 -1
  189. package/dist/traceability/validate.js +5 -7
  190. package/dist/types/entities.d.ts +12 -0
  191. package/dist/types/entities.d.ts.map +1 -1
  192. package/dist/usage-telemetry.d.ts +9 -0
  193. package/dist/usage-telemetry.d.ts.map +1 -1
  194. package/dist/usage-telemetry.js +50 -4
  195. package/dist/utils/first-sentence.d.ts +9 -0
  196. package/dist/utils/first-sentence.d.ts.map +1 -0
  197. package/dist/utils/first-sentence.js +52 -0
  198. package/dist/utils/rule-registry.generated.d.ts +11 -0
  199. package/dist/utils/rule-registry.generated.d.ts.map +1 -1
  200. package/dist/utils/rule-registry.generated.js +13 -0
  201. package/package.json +5 -5
  202. package/schema/entities.pl +12 -0
  203. package/src/public/operations/check-executor.ts +8 -0
  204. package/src/public/operations/evidence-floor.ts +29 -1
  205. package/src/public/operations/repair-plan.ts +152 -1
  206. package/src/public/operations/schema6-check-actions.ts +1 -1
  207. package/src/public/operations/specs/check-rules.generated.ts +3 -1
  208. package/src/public/operations/specs/mutation-schemas.ts +34 -0
  209. package/src/public/operations/specs/reporting.ts +38 -3
  210. package/src/public/operations/specs/semantic.ts +2 -1
  211. package/src/public/operations/symbol-coordinates-check.ts +79 -0
  212. package/src/public/proof-protocol-types.d.ts +22 -5
  213. package/src/public/proof-protocol.ts +78 -19
  214. package/src/public/proof-sources.ts +51 -3
  215. package/src/public/schemas/entity.ts +65 -0
  216. package/src/public/skills/kibi-commit-review/SKILL.md +6 -2
  217. package/src/public/skills/kibi-decisions/SKILL.md +7 -2
  218. package/src/public/skills/kibi-decisions/resources/signoff-views.md +3 -1
  219. package/src/public/skills/kibi-usage/SKILL.md +14 -3
  220. package/src/public/skills/kibi-usage/resources/prolog-proofs.md +207 -0
  221. package/src/public/skills/kibi-usage/resources/proof.md +44 -3
  222. package/src/schemas/entity.schema.json +126 -6
@@ -135,6 +135,16 @@ export declare const upsertSpec: {
135
135
  readonly minLength: 1;
136
136
  readonly description: "Requirement-only. Optional reference to the exception's approval decision record.";
137
137
  };
138
+ readonly failure_side_waiver: {
139
+ readonly type: "string";
140
+ readonly minLength: 1;
141
+ readonly description: "Requirement-only. Why the requirement has no failure side to test (its claims state a capability or output shape). Waives happy_path_only once failure_side_waiver_approved_by is set.";
142
+ };
143
+ readonly failure_side_waiver_approved_by: {
144
+ readonly type: "string";
145
+ readonly minLength: 1;
146
+ readonly description: "Requirement-only. The person who accepted failure_side_waiver.";
147
+ };
138
148
  readonly firmness: {
139
149
  readonly type: "string";
140
150
  readonly enum: readonly ["firm", "default", "exploratory"];
@@ -232,13 +242,13 @@ export declare const upsertSpec: {
232
242
  readonly 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.";
233
243
  };
234
244
  readonly source: {
235
- readonly 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.";
245
+ readonly 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?} over TypeScript, JavaScript, Python and SWI-Prolog files. 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}. prolog: {file, functor: Name/Arity, arg?} reads one argument of every fact with that functor in a SWI-Prolog file (requires/1 in pack.pl), without running it. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.";
236
246
  readonly type: "object";
237
247
  readonly required: readonly ["reader"];
238
248
  readonly properties: {
239
249
  readonly reader: {
240
250
  readonly type: "string";
241
- readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator"];
251
+ readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator", "prolog"];
242
252
  };
243
253
  };
244
254
  readonly additionalProperties: true;
@@ -262,6 +272,11 @@ export declare const upsertSpec: {
262
272
  readonly minLength: 1;
263
273
  readonly description: "exhaustive: when the export is a list of records, the field of each record that names a domain member (a catalog's name).";
264
274
  };
275
+ readonly arg: {
276
+ readonly type: "integer";
277
+ readonly minimum: 1;
278
+ readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
279
+ };
265
280
  };
266
281
  readonly additionalProperties: false;
267
282
  };
@@ -302,14 +317,19 @@ export declare const upsertSpec: {
302
317
  readonly type: "string";
303
318
  readonly minLength: 1;
304
319
  };
320
+ readonly arg: {
321
+ readonly type: "integer";
322
+ readonly minimum: 1;
323
+ readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
324
+ };
305
325
  readonly source: {
306
326
  readonly type: "object";
307
- readonly 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.";
327
+ readonly 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?} over TypeScript, JavaScript, Python and SWI-Prolog files. 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}. prolog: {file, functor: Name/Arity, arg?} reads one argument of every fact with that functor in a SWI-Prolog file (requires/1 in pack.pl), without running it. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.";
308
328
  readonly required: readonly ["reader"];
309
329
  readonly properties: {
310
330
  readonly reader: {
311
331
  readonly type: "string";
312
- readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator"];
332
+ readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator", "prolog"];
313
333
  };
314
334
  };
315
335
  readonly additionalProperties: true;
@@ -370,6 +390,11 @@ export declare const upsertSpec: {
370
390
  readonly type: "string";
371
391
  readonly minLength: 1;
372
392
  };
393
+ readonly arg: {
394
+ readonly type: "integer";
395
+ readonly minimum: 1;
396
+ readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
397
+ };
373
398
  };
374
399
  readonly additionalProperties: false;
375
400
  }, {
@@ -378,12 +403,12 @@ export declare const upsertSpec: {
378
403
  readonly properties: {
379
404
  readonly source: {
380
405
  readonly type: "object";
381
- readonly 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.";
406
+ readonly 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?} over TypeScript, JavaScript, Python and SWI-Prolog files. 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}. prolog: {file, functor: Name/Arity, arg?} reads one argument of every fact with that functor in a SWI-Prolog file (requires/1 in pack.pl), without running it. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.";
382
407
  readonly required: readonly ["reader"];
383
408
  readonly properties: {
384
409
  readonly reader: {
385
410
  readonly type: "string";
386
- readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator"];
411
+ readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator", "prolog"];
387
412
  };
388
413
  };
389
414
  readonly additionalProperties: true;
@@ -406,6 +431,11 @@ export declare const upsertSpec: {
406
431
  readonly type: "string";
407
432
  readonly minLength: 1;
408
433
  };
434
+ readonly arg: {
435
+ readonly type: "integer";
436
+ readonly minimum: 1;
437
+ readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
438
+ };
409
439
  };
410
440
  readonly additionalProperties: false;
411
441
  };
@@ -422,6 +452,11 @@ export declare const upsertSpec: {
422
452
  readonly type: "string";
423
453
  readonly minLength: 1;
424
454
  };
455
+ readonly arg: {
456
+ readonly type: "integer";
457
+ readonly minimum: 1;
458
+ readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
459
+ };
425
460
  };
426
461
  readonly additionalProperties: false;
427
462
  };
@@ -837,6 +872,26 @@ export declare const upsertSpec: {
837
872
  readonly type: "string";
838
873
  readonly description: "Exact atomic requirement clause represented by this fact, retained for human audit. On a grounding fact Kibi derives claim_key from it; an observation or meta fact quotes the clause it is about without a key.";
839
874
  };
875
+ readonly dimension_waiver: {
876
+ readonly type: "string";
877
+ readonly minLength: 1;
878
+ readonly description: "Fact-only. Why the quantifier word in claim_text ranges over nothing, so the claim needs no count, set or rule. Waives dimension_unrepresented once dimension_waiver_approved_by is set.";
879
+ };
880
+ readonly dimension_waiver_approved_by: {
881
+ readonly type: "string";
882
+ readonly minLength: 1;
883
+ readonly description: "Fact-only. The person who accepted dimension_waiver.";
884
+ };
885
+ readonly case_waiver: {
886
+ readonly type: "string";
887
+ readonly minLength: 1;
888
+ readonly description: "Fact-only. Why the edge cases derived from this fact are covered some other way or cannot occur. Waives uncovered_case once case_waiver_approved_by is set.";
889
+ };
890
+ readonly case_waiver_approved_by: {
891
+ readonly type: "string";
892
+ readonly minLength: 1;
893
+ readonly description: "Fact-only. The person who accepted case_waiver.";
894
+ };
840
895
  readonly predicate_name: {
841
896
  readonly type: "string";
842
897
  readonly description: "Optional predicate name for ontology predicate facts. Prefer kb_model mode predicates before hand-writing predicate_name.";
@@ -1 +1 @@
1
- {"version":3,"file":"upsert.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/upsert.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAQvE,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DuC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { Violation } from "../../utils/rule-registry.js";
2
+ import type { PrologPort } from "./runtime-types.js";
3
+ /**
4
+ * A symbol whose source file exists but which Kibi could not place in it is
5
+ * linked to no code: impact review, coverage and proofs never see it there.
6
+ * kibi sync names it in its refresh output only, so the check reports every
7
+ * such symbol as a warning (advisory, non-blocking).
8
+ */
9
+ export declare const SYMBOL_COORDINATES_MISSING_RULE = "symbol-coordinates-missing";
10
+ export declare function collectSymbolCoordinatesMissingViolations(prolog: Pick<PrologPort, "query">, workspaceRoot: string, rules: ReadonlySet<string>): Promise<Violation[]>;
11
+ //# sourceMappingURL=symbol-coordinates-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbol-coordinates-check.d.ts","sourceRoot":"","sources":["../../../src/public/operations/symbol-coordinates-check.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;GAKG;AAEH,eAAO,MAAM,+BAA+B,+BAA+B,CAAC;AAa5E,wBAAsB,yCAAyC,CAC7D,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,EACjC,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GACzB,OAAO,CAAC,SAAS,EAAE,CAAC,CA8BtB"}
@@ -0,0 +1,66 @@
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
+ This program is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU Affero General Public License for more details.
14
+
15
+ You should have received a copy of the GNU Affero General Public License
16
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+ */
18
+ import { existsSync, statSync } from "node:fs";
19
+ import * as path from "node:path";
20
+ import { parseEntityFromList, parseListOfLists } from "../../prolog/codec.js";
21
+ /**
22
+ * A symbol whose source file exists but which Kibi could not place in it is
23
+ * linked to no code: impact review, coverage and proofs never see it there.
24
+ * kibi sync names it in its refresh output only, so the check reports every
25
+ * such symbol as a warning (advisory, non-blocking).
26
+ */
27
+ // implements REQ-cli-check, REQ-generated-coordinate-persistence
28
+ export const SYMBOL_COORDINATES_MISSING_RULE = "symbol-coordinates-missing";
29
+ const SYMBOL_PLACEMENT_QUERY = "findall([Id,symbol,Fields], (kb_entity(Id, symbol, Props), include([Key=_]>>memberchk(Key, [title,status,sourceFile,sourceLine]), Props, Fields)), Rows)";
30
+ const INACTIVE_STATUSES = new Set([
31
+ "deprecated",
32
+ "removed",
33
+ "retired",
34
+ "superseded",
35
+ ]);
36
+ // implements REQ-cli-check
37
+ export async function collectSymbolCoordinatesMissingViolations(prolog, workspaceRoot, rules) {
38
+ if (!rules.has(SYMBOL_COORDINATES_MISSING_RULE))
39
+ return [];
40
+ const rows = await prolog.query(SYMBOL_PLACEMENT_QUERY);
41
+ if (!rows.success)
42
+ throw new Error(`symbol-coordinates-missing symbol projection failed: ${rows.error ?? "unknown error"}`);
43
+ const violations = [];
44
+ for (const row of parseListOfLists(rows.bindings.Rows ?? "[]")) {
45
+ const entity = parseEntityFromList(row);
46
+ const id = typeof entity.id === "string" ? entity.id : "";
47
+ const sourceFile = typeof entity.sourceFile === "string" ? entity.sourceFile : "";
48
+ const status = typeof entity.status === "string" ? entity.status : "";
49
+ if (id === "" || sourceFile === "" || INACTIVE_STATUSES.has(status))
50
+ continue;
51
+ if (entity.sourceLine !== undefined && entity.sourceLine !== null)
52
+ continue;
53
+ const absolute = path.resolve(workspaceRoot, sourceFile);
54
+ if (!existsSync(absolute) || !statSync(absolute).isFile())
55
+ continue;
56
+ const title = typeof entity.title === "string" ? entity.title : id;
57
+ violations.push({
58
+ rule: SYMBOL_COORDINATES_MISSING_RULE,
59
+ entityId: id,
60
+ source: sourceFile,
61
+ description: `${id} (${title}) has no symbol coordinates in ${sourceFile}: Kibi could not place it, so its links are checked against no code`,
62
+ suggestion: "Run kibi sync --refresh-symbol-coordinates and read its failed lines; use the name the extractor gives the declaration, install the plugins and grammar packs kibi doctor names, or add symbol_role and granularity_reason for a file-level link.",
63
+ });
64
+ }
65
+ return violations;
66
+ }
@@ -353,13 +353,13 @@ export declare const PROOF_CONTRACT_SCHEMA: {
353
353
  readonly 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.";
354
354
  };
355
355
  readonly source: {
356
- readonly 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.";
356
+ readonly 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?} over TypeScript, JavaScript, Python and SWI-Prolog files. 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}. prolog: {file, functor: Name/Arity, arg?} reads one argument of every fact with that functor in a SWI-Prolog file (requires/1 in pack.pl), without running it. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.";
357
357
  readonly type: "object";
358
358
  readonly required: readonly ["reader"];
359
359
  readonly properties: {
360
360
  readonly reader: {
361
361
  readonly type: "string";
362
- readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator"];
362
+ readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator", "prolog"];
363
363
  };
364
364
  };
365
365
  readonly additionalProperties: true;
@@ -383,6 +383,11 @@ export declare const PROOF_CONTRACT_SCHEMA: {
383
383
  readonly minLength: 1;
384
384
  readonly description: "exhaustive: when the export is a list of records, the field of each record that names a domain member (a catalog's name).";
385
385
  };
386
+ readonly arg: {
387
+ readonly type: "integer";
388
+ readonly minimum: 1;
389
+ readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
390
+ };
386
391
  };
387
392
  readonly additionalProperties: false;
388
393
  };
@@ -423,14 +428,19 @@ export declare const PROOF_CONTRACT_SCHEMA: {
423
428
  readonly type: "string";
424
429
  readonly minLength: 1;
425
430
  };
431
+ readonly arg: {
432
+ readonly type: "integer";
433
+ readonly minimum: 1;
434
+ readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
435
+ };
426
436
  readonly source: {
427
437
  readonly type: "object";
428
- readonly 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.";
438
+ readonly 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?} over TypeScript, JavaScript, Python and SWI-Prolog files. 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}. prolog: {file, functor: Name/Arity, arg?} reads one argument of every fact with that functor in a SWI-Prolog file (requires/1 in pack.pl), without running it. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.";
429
439
  readonly required: readonly ["reader"];
430
440
  readonly properties: {
431
441
  readonly reader: {
432
442
  readonly type: "string";
433
- readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator"];
443
+ readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator", "prolog"];
434
444
  };
435
445
  };
436
446
  readonly additionalProperties: true;
@@ -491,6 +501,11 @@ export declare const PROOF_CONTRACT_SCHEMA: {
491
501
  readonly type: "string";
492
502
  readonly minLength: 1;
493
503
  };
504
+ readonly arg: {
505
+ readonly type: "integer";
506
+ readonly minimum: 1;
507
+ readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
508
+ };
494
509
  };
495
510
  readonly additionalProperties: false;
496
511
  }, {
@@ -499,12 +514,12 @@ export declare const PROOF_CONTRACT_SCHEMA: {
499
514
  readonly properties: {
500
515
  readonly source: {
501
516
  readonly type: "object";
502
- readonly 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.";
517
+ readonly 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?} over TypeScript, JavaScript, Python and SWI-Prolog files. 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}. prolog: {file, functor: Name/Arity, arg?} reads one argument of every fact with that functor in a SWI-Prolog file (requires/1 in pack.pl), without running it. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.";
503
518
  readonly required: readonly ["reader"];
504
519
  readonly properties: {
505
520
  readonly reader: {
506
521
  readonly type: "string";
507
- readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator"];
522
+ readonly enum: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator", "prolog"];
508
523
  };
509
524
  };
510
525
  readonly additionalProperties: true;
@@ -527,6 +542,11 @@ export declare const PROOF_CONTRACT_SCHEMA: {
527
542
  readonly type: "string";
528
543
  readonly minLength: 1;
529
544
  };
545
+ readonly arg: {
546
+ readonly type: "integer";
547
+ readonly minimum: 1;
548
+ readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
549
+ };
530
550
  };
531
551
  readonly additionalProperties: false;
532
552
  };
@@ -543,6 +563,11 @@ export declare const PROOF_CONTRACT_SCHEMA: {
543
563
  readonly type: "string";
544
564
  readonly minLength: 1;
545
565
  };
566
+ readonly arg: {
567
+ readonly type: "integer";
568
+ readonly minimum: 1;
569
+ readonly description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).";
570
+ };
546
571
  };
547
572
  readonly additionalProperties: false;
548
573
  };
@@ -1 +1 @@
1
- {"version":3,"file":"proof-protocol.d.ts","sourceRoot":"","sources":["../../src/public/proof-protocol.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,iBAAiB,EAAG,mBAA4B,CAAC;AAE9D,eAAO,MAAM,sBAAsB,EAAG,wBAAiC,CAAC;AACxE;;;GAGG;AAEH,eAAO,MAAM,qBAAqB,EAAG,uBAAgC,CAAC;AACtE,yEAAyE;AAEzE,eAAO,MAAM,wBAAwB,EAAG,uBAAgC,CAAC;AAEzE,eAAO,MAAM,sBAAsB,6DAGzB,CAAC;AACX,4EAA4E;AAE5E,eAAO,MAAM,wBAAwB,EAAG,0BAAmC,CAAC;AAE5E,eAAO,MAAM,yBAAyB,EAAG,2BAAoC,CAAC;AAE9E,eAAO,MAAM,kBAAkB,iGAQrB,CAAC;AAEX,eAAO,MAAM,qBAAqB,iFAOxB,CAAC;AAEX,eAAO,MAAM,mBAAmB,2CAA4C,CAAC;AAE7E,eAAO,MAAM,eAAe,sCAAuC,CAAC;AAEpE,eAAO,MAAM,kBAAkB,6EAMrB,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,sEAGnB,CAAC;AAEX;;;;;;;;GAQG;AAEH,eAAO,MAAM,WAAW,qIAYd,CAAC;AAGX,eAAO,MAAM,uBAAuB,uGAS1B,CAAC;AAGX,MAAM,MAAM,SAAS,GAAG,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwIxB,CAAC;AAEX,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBxB,CAAC;AA0GX,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAgCzE;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAoH/D;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAyD5D;AAiUD;;;GAGG;AAEH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,IAAI,CACL,aAAa,EACX,MAAM,GACN,eAAe,GACf,SAAS,GACT,mBAAmB,GACnB,cAAc,GACd,QAAQ,GACR,kBAAkB,GAClB,SAAS,GACT,gBAAgB,GAChB,gBAAgB,GAChB,QAAQ,CACX,CAwEA;AAgFD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CA8C5D"}
@@ -227,19 +227,25 @@ export const PROOF_RUN_ARTIFACT_SCHEMA = {
227
227
  },
228
228
  additionalProperties: false,
229
229
  };
230
+ const ARG_SCHEMA = {
231
+ type: "integer",
232
+ minimum: 1,
233
+ description: "A SWI-Prolog predicate's argument (1-based) whose solutions Kibi reads, when the predicate takes more than one argument (operator/2 with arg 1 lists each operator's name).",
234
+ };
230
235
  const SOURCE_REFERENCE_SCHEMA = {
231
236
  type: "object",
232
237
  required: ["symbol_id"],
233
238
  properties: {
234
239
  symbol_id: { type: "string", minLength: 1 },
235
240
  export: { type: "string", minLength: 1 },
241
+ arg: ARG_SCHEMA,
236
242
  },
237
243
  additionalProperties: false,
238
244
  };
239
- // implements REQ-kibi-source-proof-kinds
245
+ // implements REQ-kibi-source-proof-kinds, REQ-kibi-prolog-source-readers
240
246
  const SOURCE_SPEC_SCHEMA = {
241
247
  type: "object",
242
- 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.",
248
+ 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?} over TypeScript, JavaScript, Python and SWI-Prolog files. 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}. prolog: {file, functor: Name/Arity, arg?} reads one argument of every fact with that functor in a SWI-Prolog file (requires/1 in pack.pl), without running it. Paths are repository-relative. A member Kibi cannot read statically fails the read with its location.",
243
249
  required: ["reader"],
244
250
  properties: {
245
251
  reader: { type: "string", enum: [...SOURCE_READERS] },
@@ -318,6 +324,7 @@ export const PROOF_CONTRACT_SCHEMA = {
318
324
  minLength: 1,
319
325
  description: "exhaustive: when the export is a list of records, the field of each record that names a domain member (a catalog's name).",
320
326
  },
327
+ arg: ARG_SCHEMA,
321
328
  },
322
329
  additionalProperties: false,
323
330
  },
@@ -344,6 +351,7 @@ export const PROOF_CONTRACT_SCHEMA = {
344
351
  properties: {
345
352
  symbol_id: { type: "string", minLength: 1 },
346
353
  export: { type: "string", minLength: 1 },
354
+ arg: ARG_SCHEMA,
347
355
  source: SOURCE_SPEC_SCHEMA,
348
356
  measure: {
349
357
  type: "string",
@@ -655,10 +663,18 @@ function proofContractKindErrors(contract) {
655
663
  !nonEmptyString(row.symbol_id) ||
656
664
  (row.export !== undefined && !nonEmptyString(row.export)) ||
657
665
  (row.field !== undefined && !nonEmptyString(row.field)) ||
658
- Object.keys(row).some((key) => key !== "symbol_id" && key !== "export" && key !== "field"))
659
- errors.push("proof_contract.domain_source must be {symbol_id, export?, field?} naming the symbol that defines the domain, the export to read when its title is not the export name, and the record field that names each member");
666
+ (row.arg !== undefined && !isArgIndex(row.arg)) ||
667
+ Object.keys(row).some((key) => key !== "symbol_id" &&
668
+ key !== "export" &&
669
+ key !== "field" &&
670
+ key !== "arg"))
671
+ errors.push("proof_contract.domain_source must be {symbol_id, export?, field?, arg?} naming the symbol that defines the domain, the export to read when its title is not the export name, the record field that names each member, and for a SWI-Prolog predicate the argument (1-based) that names it");
672
+ else if (row.field !== undefined && row.arg !== undefined)
673
+ errors.push("proof_contract.domain_source takes field (a record field) or arg (a Prolog argument), not both");
660
674
  else if (row.field !== undefined && kind !== "exhaustive")
661
675
  errors.push(`proof_contract.domain_source.field applies only to kind exhaustive, not ${String(kind ?? "e2e")}`);
676
+ else if (row.arg !== undefined && kind !== "exhaustive")
677
+ errors.push(`proof_contract.domain_source.arg applies only to kind exhaustive, not ${String(kind ?? "e2e")}`);
662
678
  }
663
679
  else if (kind === "exhaustive" || kind === "typecheck")
664
680
  errors.push(`proof_contract.domain_source is required for kind ${String(kind)}: name the symbol the proof reads its domain from`);
@@ -692,8 +708,10 @@ function proofContractKindErrors(contract) {
692
708
  if (row === null || row.source === undefined)
693
709
  return;
694
710
  errors.push(...sourceSpecErrors(row.source, `proof_contract.value_source[${index}].source`));
695
- if (row.symbol_id !== undefined || row.export !== undefined)
696
- errors.push(`proof_contract.value_source[${index}] names a source, so it takes no symbol_id or export`);
711
+ if (row.symbol_id !== undefined ||
712
+ row.export !== undefined ||
713
+ row.arg !== undefined)
714
+ errors.push(`proof_contract.value_source[${index}] names a source, so it takes no symbol_id, export or arg`);
697
715
  if (row.measure !== undefined && row.measure !== "count")
698
716
  errors.push(`proof_contract.value_source[${index}].measure must be count for a source: Kibi counts the members it reads`);
699
717
  });
@@ -706,12 +724,16 @@ function proofContractKindErrors(contract) {
706
724
  return (row !== null &&
707
725
  nonEmptyString(row.symbol_id) &&
708
726
  (row.export === undefined || nonEmptyString(row.export)) &&
727
+ (row.arg === undefined || isArgIndex(row.arg)) &&
709
728
  (row.measure === undefined ||
710
729
  row.measure === "value" ||
711
730
  row.measure === "count") &&
712
- Object.keys(row).every((key) => key === "symbol_id" || key === "export" || key === "measure"));
731
+ Object.keys(row).every((key) => key === "symbol_id" ||
732
+ key === "export" ||
733
+ key === "arg" ||
734
+ key === "measure"));
713
735
  }))
714
- errors.push("proof_contract.value_source must be [{symbol_id, export?, measure?: value|count} or {source, measure?: count}] naming the code constants or project sources the assumptions read");
736
+ errors.push("proof_contract.value_source must be [{symbol_id, export?, arg?, measure?: value|count} or {source, measure?: count}] naming the code constants or project sources the assumptions read");
715
737
  else if (kind !== "arithmetic" && kind !== "smt")
716
738
  errors.push(`proof_contract.value_source applies only to kind arithmetic or smt, not ${String(kind ?? "e2e")}`);
717
739
  }
@@ -729,12 +751,16 @@ function proofContractKindErrors(contract) {
729
751
  }
730
752
  return errors;
731
753
  }
732
- function isSourceReference(value) {
754
+ function isArgIndex(value) {
755
+ return typeof value === "number" && Number.isInteger(value) && value >= 1;
756
+ }
757
+ function isSourceReference(value, options = { arg: true }) {
733
758
  const row = record(value);
734
759
  return (row !== null &&
735
760
  nonEmptyString(row.symbol_id) &&
736
761
  (row.export === undefined || nonEmptyString(row.export)) &&
737
- Object.keys(row).every((key) => key === "symbol_id" || key === "export"));
762
+ (row.arg === undefined || (options.arg === true && isArgIndex(row.arg))) &&
763
+ Object.keys(row).every((key) => key === "symbol_id" || key === "export" || key === "arg"));
738
764
  }
739
765
  function isSourceMap(value, accepts = isSourceReference) {
740
766
  const row = record(value);
@@ -744,10 +770,11 @@ function isSourceMap(value, accepts = isSourceReference) {
744
770
  }
745
771
  function isPredicateReference(value) {
746
772
  const row = record(value);
773
+ // A predicate is called with every argument, so it projects none.
747
774
  if (row === null || row.harness_for === undefined)
748
- return isSourceReference(value);
775
+ return isSourceReference(value, { arg: false });
749
776
  const { harness_for: harness, ...reference } = row;
750
- return (isSourceReference(reference) &&
777
+ return (isSourceReference(reference, { arg: false }) &&
751
778
  Array.isArray(harness) &&
752
779
  harness.length > 0 &&
753
780
  harness.every(nonEmptyString));
@@ -770,7 +797,7 @@ function sourceContractErrors(contract) {
770
797
  errors.push(`proof_contract.source applies only to kind source, not ${String(kind ?? "e2e")}`);
771
798
  }
772
799
  else if (kind === "source")
773
- errors.push("proof_contract.source is required for kind source: name the project source Kibi reads (reader json, yaml, glob, openapi, references, schema, routes or validator)");
800
+ errors.push("proof_contract.source is required for kind source: name the project source Kibi reads (reader json, yaml, glob, openapi, references, schema, routes, validator or prolog)");
774
801
  const domains = record(contract.domains);
775
802
  for (const [type, entry] of Object.entries(domains ?? {}))
776
803
  if (isSourceDomain(entry)) {
@@ -797,10 +824,10 @@ function nonNumericContractErrors(contract) {
797
824
  errors.push("proof_contract.predicate_source must map each predicate name to {symbol_id, export?, harness_for?} naming the function that decides it");
798
825
  if (contract.domains !== undefined &&
799
826
  !isSourceMap(contract.domains, (entry) => isSourceReference(entry) || isSourceDomain(entry)))
800
- errors.push("proof_contract.domains must map each argument type to {symbol_id, export?} naming the export that lists its values, or {source} naming the project source Kibi reads them from");
827
+ errors.push("proof_contract.domains must map each argument type to {symbol_id, export?, arg?} naming the export (or SWI-Prolog predicate and argument) that lists its values, or {source} naming the project source Kibi reads them from");
801
828
  for (const field of ["initial_source", "pattern_source"])
802
829
  if (contract[field] !== undefined && !isSourceReference(contract[field]))
803
- errors.push(`proof_contract.${field} must be {symbol_id, export?} naming the export Kibi reads`);
830
+ errors.push(`proof_contract.${field} must be {symbol_id, export?, arg?} naming the export (or SWI-Prolog predicate and argument) Kibi reads`);
804
831
  only("predicate_source", ["rule"]);
805
832
  only("domains", ["rule", "state_machine"]);
806
833
  only("initial_source", ["state_machine"]);
@@ -840,6 +867,7 @@ export function optionalProofContractFields(contract) {
840
867
  symbol_id: domain.symbol_id,
841
868
  ...(typeof domain.export === "string" ? { export: domain.export } : {}),
842
869
  ...(typeof domain.field === "string" ? { field: domain.field } : {}),
870
+ ...(isArgIndex(domain.arg) ? { arg: domain.arg } : {}),
843
871
  };
844
872
  const witness = record(contract.witness);
845
873
  if (witness && typeof witness.path === "string")
@@ -863,6 +891,7 @@ export function optionalProofContractFields(contract) {
863
891
  return {
864
892
  symbol_id: row.symbol_id,
865
893
  ...(typeof row.export === "string" ? { export: row.export } : {}),
894
+ ...(isArgIndex(row.arg) ? { arg: row.arg } : {}),
866
895
  ...(row.measure === "value" || row.measure === "count"
867
896
  ? { measure: row.measure }
868
897
  : {}),
@@ -931,6 +960,7 @@ function sourceReference(value) {
931
960
  return {
932
961
  symbol_id: row.symbol_id,
933
962
  ...(typeof row.export === "string" ? { export: row.export } : {}),
963
+ ...(isArgIndex(row.arg) ? { arg: row.arg } : {}),
934
964
  };
935
965
  }
936
966
  function sourceMap(value) {
@@ -1,4 +1,4 @@
1
- export declare const SOURCE_READERS: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator"];
1
+ export declare const SOURCE_READERS: readonly ["json", "yaml", "glob", "openapi", "references", "schema", "routes", "validator", "prolog"];
2
2
  export type SourceReader = (typeof SOURCE_READERS)[number];
3
3
  /** A source spec as a proof contract states it; see sourceSpecErrors. */
4
4
  export type SourceSpec = Readonly<Record<string, unknown>> & Readonly<{
@@ -56,7 +56,7 @@ export declare function sourceSpecErrors(value: unknown, label: string): string[
56
56
  /** The spec with only the keys its reader takes, for contract hashing. */
57
57
  export declare function normalizeSourceSpec(value: unknown): SourceSpec | undefined;
58
58
  /** Workspace-relative files a glob list matches, sorted. */
59
- export declare function matchWorkspaceFiles(workspaceRoot: string, patterns: readonly string[], ignore?: readonly string[]): string[];
59
+ export declare function matchWorkspaceFiles(workspaceRoot: string, patterns: readonly string[], ignore?: readonly string[], caseSensitive?: boolean): string[];
60
60
  export type SourceDependency = Readonly<{
61
61
  id: string;
62
62
  hash: string;
@@ -90,6 +90,8 @@ export declare function readSource(workspaceRoot: string, spec: SourceSpec, eval
90
90
  export type SourceCodeEvaluation = {
91
91
  ok: true;
92
92
  members?: string[];
93
+ /** The prolog reader's members in file order, duplicates kept. */
94
+ sequence?: string[];
93
95
  entities?: SourceEntity[];
94
96
  routes?: SourceRoute[];
95
97
  } | {
@@ -1 +1 @@
1
- {"version":3,"file":"proof-sources.d.ts","sourceRoot":"","sources":["../../src/public/proof-sources.ts"],"names":[],"mappings":"AAwCA,eAAO,MAAM,cAAc,6FASjB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,yEAAyE;AAEzE,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxD,QAAQ,CAAC;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC;AAErC,6DAA6D;AAC7D,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,4DAA4D;AAC5D,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,C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