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
@@ -17,12 +17,18 @@ reports what happened as `kibi.proof-run.v1`; Kibi evaluates proof.
17
17
  ```bash
18
18
  kibi prove --test TEST-<id>
19
19
  # or: kibi prove --requirement REQ-<id> | --integration <id> | --all
20
+ # add --stale to rerun only tests without a current passing receipt
21
+ # add --resume to continue an interrupted run (same selector)
20
22
  ```
21
23
 
24
+ With `--test`, `--requirement` or `--stale`, a direct `playwright test`
25
+ integration runs only the selected tests' `proof_bindings[].source_file`
26
+ specs; wrappers get them as `KIBI_PROOF_SOURCE_FILES`.
27
+
22
28
  `kibi prove` captures the workspace snapshot, runs each integration's
23
29
  producer once (`shell: false`), revalidates the snapshot, evaluates the
24
30
  artifact against every selected contract, and appends idempotent
25
- `kibi.proof-receipt.v1` receipts.
31
+ `kibi.proof-receipt.v2` receipts (v1 receipts stay valid).
26
32
  3. Confirm with `kb_status` (fresh, current snapshot) and `kb_coverage`.
27
33
 
28
34
  Never hand-write receipts. Kibi derives them from validated
@@ -51,6 +57,13 @@ proof_bindings: # optional provenance metadata
51
57
 
52
58
  Provenance lives in `proof_bindings`; the contract stays semantic.
53
59
 
60
+ `success_policy: own_results_first_attempt` judges each obligation by its own
61
+ `native_case` result when the run failed only in execution (other cases
62
+ failed), so one unrelated failing case does not fail every receipt of a
63
+ Playwright suite. Aggregate-run obligations, run-level errors, timeouts,
64
+ interruptions and setup failures still refuse every obligation. Keep
65
+ `all_required_first_attempt` unless the user wants per-case judgement.
66
+
54
67
  - Every `required_proofs[].symbol_id` must name an existing `symbol` entity,
55
68
  or `kb_check` reports `proof-contract-symbols`. Create the symbols first
56
69
  (`kb_upsert`, narrow method-level granularity, never a `type-shape`
@@ -85,7 +98,10 @@ replacing one named integration.
85
98
  `--command` the proposal is the `package.json` `test` script or the
86
99
  detected runner again), or make the run attributable per test: have the
87
100
  command write a `kibi.proof-test-report.v1` to the path in
88
- `KIBI_PROOF_TEST_REPORT` so each test is judged by its own steps.
101
+ `KIBI_PROOF_TEST_REPORT` so each test is judged by its own steps. The
102
+ shipped `kibi proof run-steps` does that from `proof/steps.json`
103
+ (`[{test_id, steps: [[argv...]]}]`); use it as the integration command
104
+ instead of writing a producer script.
89
105
  - `producer: playwright` (or custom) — the child emits `kibi.proof-run.v1`
90
106
  itself (bundled reporter: `kibi-cli/playwright-reporter`).
91
107
  - `producer: junit` / `tap` — Kibi converts the native report at `artifact`
@@ -126,8 +142,11 @@ Every requirement row also carries `evidenceLevel`, the strength of what backs
126
142
  it, and `evidence`, the entries that earned it (each with `kind`, `scope` and
127
143
  `level`):
128
144
 
129
- - `proved`: a re-checkable certificate covers every case. No proof kind issues
130
- certificates yet, so nothing reaches it today.
145
+ - `proved`: the requirement is `tested` and every applicable claim has a
146
+ derived, code-scope binding from a fresh certificate that still re-checks
147
+ (see Certificate proof kinds). The entry has `kind: certificate` and lists
148
+ the tests. `claimSummary` counts claims per level and `unprovedClaims`
149
+ lists the claims below proved.
131
150
  - `tested`: `proofStatus` is `tested`; fresh E2E receipts cover every linked
132
151
  scenario.
133
152
  - `asserted`: a person stands behind the statement (approved, or firm by
@@ -138,6 +157,189 @@ Report the level as it is. Never call an `asserted` or `unverified`
138
157
  requirement proven or tested, and never call `tested` proved. Firmness is a
139
158
  separate axis: it says how sure the person is, not how strong the evidence is.
140
159
 
160
+ ## Certificate proof kinds
161
+
162
+ A contract's `kind` says what its evidence can reach. The runner kinds `e2e`
163
+ (the default), `example` and `property` support `tested`. The certificate
164
+ kinds support `proved`, and only when Kibi re-checks the certificate the test
165
+ left:
166
+
167
+ - `exhaustive`: the test runs a check on every member of a finite domain.
168
+ Set `domain_source: { symbol_id: SYM-<domain> }` to the symbol that defines
169
+ the domain (add `export: <name>` when the export is not named like the
170
+ symbol's title), and import that symbol in the proof file. Kibi loads the
171
+ export itself (bun, the workspace's tsx, or node; for a `.py` domain
172
+ `KIBI_PYTHON`, the active or project `.venv`/`venv`, then `python3`:
173
+ Enum values, dict keys, list/tuple/set items) and rejects a
174
+ certificate that does not cover exactly its members, so a hand-listed or
175
+ partial domain stays `tested`. An import from build output is mapped back
176
+ to its source through `tsconfig.json` `outDir`/`rootDir`.
177
+ - `typecheck`: a witness file that stops compiling when a domain member
178
+ goes unhandled (a switch ending in a `never` assignment, or a
179
+ `satisfies Record<Domain, ...>` map). Set `witness.path` and
180
+ `domain_source`; the witness must import the domain. Kibi compiles the
181
+ witness itself (strict, with the workspace's TypeScript and the import
182
+ resolution and declaration files of the nearest `tsconfig.json`), so
183
+ `typescript` must be
184
+ installed in the workspace (TypeScript 7 has no compiler API: add
185
+ `typescript@6` as a dev dependency). With `proves`, Kibi decides each
186
+ claim with its own witness and reports the fields or members that break
187
+ it. When the test's compile failed, the rejection adds the first error
188
+ Kibi's own compile of the witness reports.
189
+ - `arithmetic`: a claim on one `int` or `real` variable decided exactly from
190
+ typed facts. Set `constraint_source: { fact_ids: [FACT-...] }` to the
191
+ numeric `property_value` facts (one subject and property); the
192
+ certificate's variable is their `property_key` and its assumptions are
193
+ exactly their constraints. To read the value from the code instead, set
194
+ `value_source: [{ symbol_id: SYM-<constant>, export: <name> }]`; Kibi
195
+ evaluates the number export itself and adds `variable eq value` as an
196
+ assumption. For a count claim over a collection ("exactly 32 tools") add
197
+ `measure: count` and name the list, set, map or object export; Kibi uses
198
+ its size, so do not add a number export just for the proof. A count
199
+ claim needs only `value_source`. Naming the claim's own fact in
200
+ `constraint_source` assumes the claim: without `value_source` Kibi counts
201
+ that derivation as intent only (tested), and with it a code value that
202
+ breaks the claim shows up as contradictory assumptions, which the
203
+ rejection names.
204
+ A claim that every member of a closed set has a property ("Every currency
205
+ in GBP, ILS and ZAR must fail closed") is a set fact whose `property_key`
206
+ names the property, whose `value_set` is the members and whose operator
207
+ is `includes` (other members may have the property too, so two such
208
+ claims over different sets do not contradict). Prove it with `rule`: Kibi
209
+ checks the property on each listed member. The kinds that compare the
210
+ whole set (`exhaustive`, `state_machine`) reject an `includes` fact.
211
+ - `smt`: an SMT-LIB query that declares the facts' property as a constant,
212
+ asserts each `constraint_source` fact constraint and then the claim's
213
+ negation. Kibi re-runs z3 or cvc5 on it and accepts only `unsat`.
214
+ - `rule`: decisions over finite domains. Set `predicate_source: {<predicate>:
215
+ { symbol_id }}` to the function behind each predicate the claim uses (it
216
+ takes the arguments in order and returns a boolean) and `domains: {<type>:
217
+ { symbol_id }}` to the export listing each argument type's values. Kibi
218
+ calls every function on every combination and model checks the claim's
219
+ fact: a `kibi.logic.v1` rule fact (from `kb_model_requirement` with
220
+ `logic`) must hold for every assignment, a predicate fact must be decided
221
+ as it says, and a set fact whose `property_key` names a predicate needs it
222
+ true for every member. A type name is also a one-argument predicate
223
+ (`role(R)`) to range a variable. A failure names the assignment. A domain
224
+ can come from the project instead of an export (`domains: {<type>:
225
+ {source: {...}}}`, see `source` below). When the predicate is a test
226
+ harness that drives real code (it calls the handler with each role), add
227
+ `harness_for: [SYM-...]` naming that code; the claim binds with scope
228
+ `harness`, which proves, and those symbols must be `covered_by` the test.
229
+ Add `export: <name>` to a `predicate_source` entry when the function's
230
+ export is not the symbol's title.
231
+ - `state_machine`: set `domain_source` to the transition table (object or
232
+ Map from state to next states, or `[from, to]` pairs) or to a
233
+ `next(state, event)` function with `domains: {state, event}`;
234
+ `initial_source` names the initial state. Model "transitions must be one of
235
+ a -> b, ..." as a `transitions` set fact (members `a->b`), and terminal,
236
+ initial or reachable states as `terminal_states`, `initial_states` or
237
+ `reachable_states` set facts; Kibi checks that projection exactly.
238
+ Temporal claims use two more projections: "a cancelled invoice can never
239
+ become paid" is a `reachable_pairs` fact with `operator: excludes` and
240
+ member `cancelled->paid`, and "every path from draft to paid must pass
241
+ through approved" is a `required_waypoints` fact with member
242
+ `draft->paid via approved` (paid must be reachable from draft, and not
243
+ once approved is removed). Any projection also takes `includes`,
244
+ `subset_of` and `excludes`. Rules over a machine use `transition`,
245
+ `reachable`, `initial`, `terminal`, `state`.
246
+ - `regex`: set `pattern_source` to a `RegExp`, a Python `re.compile(...)` or
247
+ a string constant. Model "X must match `re`" as a string fact with
248
+ `operator: matches` (a JavaScript pattern with the `u` flag, matched
249
+ whole); Kibi decides exact language equality and reports the shortest
250
+ string only one side accepts. Backreferences, lookaround, `\b`, the `g`,
251
+ `y`, `m` and `v` flags, Python `\d`/`\w` without `re.ASCII` and
252
+ non-ASCII letters under `i` are refused with the reason. An exact string
253
+ fact (`eq`/`neq`) checks a constant.
254
+ - `source`: Kibi reads a project source itself and checks a set fact
255
+ against what it read, so the test only runs the proof (it may write
256
+ nothing, or `sourceCertificate({ testId })`). Set `source: {reader, ...}`:
257
+ `json`/`yaml` (`file`, `path`, `select`), `glob` (`pattern`, `capture`),
258
+ `openapi` (`file`, `select: operations|unsecured_operations|...`),
259
+ `references` (`files`, `extract: env|imports|calls|string_args|thrown|
260
+ property`), `schema` (`format: drizzle|prisma|sql`, `select:
261
+ tables|columns|required_columns|nullable_columns|foreign_keys`), `routes`
262
+ (Hono or Express app export, `path_prefix`, `names_from`, `select:
263
+ routes|middleware`) or `validator` (zod, valibot or pydantic, `select:
264
+ fields|required_fields|optional_fields`). A member Kibi cannot read
265
+ statically (a computed env name, a dynamic import, an env object handed
266
+ to a variable) fails the read with its location, and so does an empty
267
+ read (a glob matching no file, migrations with no `CREATE TABLE`), so a
268
+ read is never silently partial. Model the claim as a set fact: `eq`
269
+ (exactly), `includes` (at least), `subset_of` ("must be one of"),
270
+ `excludes` ("must never use"); `property_key: required_fields` or
271
+ `nullable_fields` (only `eq`/`includes`) with bare members `name` for
272
+ "every table" (it also covers tables added later) or `table.name` for
273
+ one; `middleware` with `includes` for "every route under /p must use M"
274
+ (Kibi checks each route). Name middleware with `names_from`: a
275
+ zero-argument factory export such as `requireAuth()` names the
276
+ middleware it returns `requireAuth`. Write the fact with `kb_model`
277
+ (requirement mode, `operator` plus a list `value`) or `kb_upsert`. The
278
+ receipt stales when a file the read touched changes, and the claim binds
279
+ with scope `source`. `value_source` accepts `{source, measure: count}`.
280
+ The builders need kibi-cli 2.33.0 or newer in the project. The env
281
+ extractor reads `process.env`, `import.meta.env`, `Bun.env`,
282
+ `Deno.env.get`, `os.environ` and `os.getenv`, through casts.
283
+
284
+ `arithmetic` and `smt` from `constraint_source` alone prove that the
285
+ knowledge base's facts entail the claim, not that code follows the facts:
286
+ their claim bindings have scope `intent` and the claim stays `tested`. Use
287
+ `value_source` (its symbols `covered_by` the test) for scope `code`. A test
288
+ whose numbers are not in typed facts or code constants stays `tested`.
289
+
290
+ Every certificate contract names the claims it proves in `proves:
291
+ [CLAIM-...]` (blocking `proof-contract-claims` from schema 12). Kibi derives
292
+ each claim's obligation from its grounding fact: a set fact (`value_type:
293
+ set`, `value_set: [...]`) needs the `exhaustive` domain or the `typecheck`
294
+ domain type to be exactly the set (with `property_key: required_fields`,
295
+ `typecheck` instead needs every member to be a required, non-nullable field
296
+ of the domain type); a numeric fact needs the `arithmetic` claim or the
297
+ negated `smt` assertion to be its constraint; rule, predicate, machine and
298
+ string facts need the `rule`, `state_machine` or `regex` checks above. The receipt
299
+ records one binding per claim: `derived` (checked, the only kind that
300
+ proves), `attested` (the fact has no derivation; counts as tested) or
301
+ `rejected` with the reason. Model an enumerated claim as a set fact and a
302
+ bound as a numeric fact before writing its certificate. `kibi proof explain
303
+ REQ-...` shows each claim with its bindings.
304
+
305
+ Build the certificate with `kibi-cli/proof-certificates`
306
+ (`exhaustiveCertificate`, `typecheckCertificate`, `arithmeticCertificate`,
307
+ `smtCertificate`, `ruleCertificate`, `stateMachineCertificate`,
308
+ `regexCertificate`, `sourceCertificate`; `readProjectSource` returns Kibi's
309
+ read for a test that wants to assert on it), fail the test when it records a failure
310
+ (`failedMembers`, `failedCalls`), and call `writeCodeCertificate`; it writes to the
311
+ directory `kibi prove` sets in `KIBI_PROOF_CERTIFICATES` and does nothing
312
+ elsewhere. A Python test writes the same `kibi.code-certificate.v1` JSON
313
+ to that directory itself. Wire the KB: the proof file symbol is
314
+ `executable_for` the test and named in `required_proofs`; the domain symbol
315
+ (and every symbol a rule, machine or pattern contract names) `implements`
316
+ the requirement and is `covered_by` the test; the test
317
+ `validates` one of the requirement's scenarios. `proved` is per claim: a
318
+ multi-claim requirement is proved only when certificates derive every
319
+ applicable claim, and reads `tested` with `n/m claims proved` otherwise. A
320
+ rejected certificate leaves the receipt at `tested` with
321
+ `certificate_rejection` naming why; fix the proof, never the receipt. If a
322
+ stored certificate stops re-checking later, coverage and `kibi proof
323
+ explain` list it under `certificateRejections`. Use a
324
+ certificate kind only when the domain or claim is genuinely finite or
325
+ decidable; an e2e test that samples cases stays `tested`.
326
+
327
+ ## Evidence floors
328
+
329
+ Each current requirement accepts a weakest level, its floor: the
330
+ `required_evidence` field (`proved`, `tested`, `asserted` or `unverified`),
331
+ or, when absent, `tested` for a firm requirement and no floor otherwise.
332
+ `kb_check`'s `evidence-floor` rule fails while the level is below the floor;
333
+ coverage rows show it as `evidenceFloor` (`required`, `source`, `status`).
334
+ A requirement whose receipts are only older than the code is
335
+ `pending_reproof` and passes a plain check; `kibi check --fresh-evidence`
336
+ fails it, and is what CI runs after `kibi prove`.
337
+
338
+ Fix a finding by raising the level: add the scenario, the end-to-end
339
+ test with a proof contract and the receipts, or have a person approve the
340
+ requirement. Lower `required_evidence` only when a person decides the
341
+ requirement does not need that evidence, and say why in the requirement.
342
+
141
343
  ## Knowledge-base certificates
142
344
 
143
345
  `kb_check` (`kibi check`) proves facts about the KB itself in its
@@ -182,19 +384,23 @@ feasibility are not certified yet; their own rules still decide them.
182
384
 
183
385
  ## After code changes
184
386
 
185
- Receipts bind to the snapshot, contract hash, and execution fingerprint at
186
- run time. Any code or source change moves the snapshot and stales receipts:
187
- re-run `kibi prove` for the affected selection, then confirm `kb_status` and
188
- `kb_coverage` before handoff.
387
+ Receipts bind to the contract, the test document (its links excluded) and
388
+ the code of the symbols they cover. A change to that code stales them:
389
+ re-run `kibi prove --stale` (or the affected selection), then confirm
390
+ `kb_status` and `kb_coverage` before handoff. Type-shape symbols covered by a
391
+ unit test count only while that unit test has a current passing receipt, so
392
+ prove unit tests that cover type-shape symbols too.
189
393
 
190
- Full reference: `docs/proving-requirements.md`.
394
+ Full reference: [Proving requirements](https://looted.github.io/kibi/reference/proving.html)
395
+ (`docs/proving-requirements.md` in the Kibi repository).
191
396
 
192
397
  ## Debugging proof regressions
193
398
 
194
- When a proof ratchet fails, diagnose first. Do not treat
195
- `proof/baseline.json` as the thing to edit.
399
+ When the `evidence-floor` rule fails, diagnose first. Do not lower
400
+ `required_evidence` to make it pass.
196
401
 
197
- 1. Do not refresh `proof/baseline.json` as the first fix.
402
+ 1. Read the finding: it names the requirement, its level, its floor and where
403
+ the floor comes from (`explicit` or `firmness`).
198
404
  2. Identify the exact requirement and symbol responsible for the regression.
199
405
  3. Use Kibi proof diagnostics rather than reverse-engineering
200
406
  `requirement_proof.pl`:
@@ -202,14 +408,9 @@ When a proof ratchet fails, diagnose first. Do not treat
202
408
  ```bash
203
409
  kibi proof explain REQ-<id>
204
410
  kibi proof explain SYM-<id>
205
- kibi proof impact
411
+ kibi check --rules evidence-floor
206
412
  ```
207
413
 
208
- `kibi proof impact` compares the current Proof projection to
209
- `HEAD:proof/baseline.json` (the committed ratchet snapshot, not the
210
- working-tree file). It is diagnostic: fingerprint differences are reported
211
- and the command exits 0 on successful evaluation. The strict ratchet remains
212
- `scripts/check-proof-baseline.mjs`.
213
414
  4. For `missing_production_symbol_coverage`, inspect symbol role, owning
214
415
  requirement, `covered_by`, candidate test scope, the requirement scenario
215
416
  chain, and the current proof receipt. `kibi proof explain` prints those as
@@ -231,5 +432,5 @@ When a proof ratchet fails, diagnose first. Do not treat
231
432
  `covered_by` relationship semantically correct.
232
433
  10. Prefer one meaningful E2E scenario covering multiple internal functions
233
434
  plus focused unit tests for edge cases, rather than an E2E test per helper.
234
- 11. Refresh the baseline only after a genuine intentional proof-state
235
- improvement requires the ratchet snapshot to be updated.
435
+ 11. A `pending_reproof` finding under `--fresh-evidence` needs `kibi prove`
436
+ for the tests behind the requirement, not a KB change.
@@ -116,7 +116,7 @@ The canonical workflow for any KB operation follows this pattern:
116
116
  7. **Create endpoints**: validated `kb_upsert` for new entities, sequentially
117
117
  8. **Link**: validated `kb_upsert` with `requires_rule`, `requires_predicate`, `constrains`, or `requires_property`, sequentially
118
118
  9. **Validate coverage and consistency**: targeted `rule-safety`, `rule-verifiability`, `semantic-completeness`, `logic-coverage`, `predicate-verifiability`, and `domain-contradictions`, then final full `kb_check`
119
- 10. **Prove execution**: read `kb_status.proofSnapshot`, run `kibi prove` so each configured integration executes once and its `kibi.proof-run.v1` artifact is evaluated against every selected test's `kibi.proof-contract.v1` obligations, appending idempotent `kibi.proof-receipt.v1` receipts; then re-run `kb_coverage`. Never promote durable test status into fresh evidence.
119
+ 10. **Prove execution**: read `kb_status.proofSnapshot`, run `kibi prove` so each configured integration executes once and its `kibi.proof-run.v1` artifact is evaluated against every selected test's `kibi.proof-contract.v1` obligations, appending idempotent `kibi.proof-receipt.v2` receipts; then re-run `kb_coverage` and read each requirement's `evidenceLevel` and `evidenceFloor`. Never promote durable test status into fresh evidence.
120
120
  11. **Repair incrementally**: require `kb_coverage.repairPlan.scope.complete`, apply only one `ready` dependency batch per requirement, validate before every sequential write, and rerun coverage before selecting the next batch
121
121
  12. **Gate workflow evidence**: when `.kb/usage.log` exists, run `kibi usage-metrics --format json --require-acceptance`; repair ranked telemetry diagnostics and never treat stale or insufficient evidence as a pass
122
122
 
@@ -144,7 +144,7 @@ choose package managers, ground semantic claims, resolve contradictions, rerun
144
144
  E2E tests, rewrite receipt history, remap authored symbols, or accept
145
145
  limitations. Those actions remain explicit review/operator/execution steps.
146
146
 
147
- For `e2e_receipt_freshness_low`, query each listed requirement/test gap and run `kibi prove --requirement <id>` (or the covering integration); this appends proof receipts idempotently and preserves history. If `coverage_depth_review` conflicts with a coverage row whose `proofStages.passingE2e.status` is `passed`, report the diagnostic as a stale heuristic and keep any independent proof gaps unresolved.
147
+ For `e2e_receipt_freshness_low`, query each listed requirement/test gap and run `kibi prove --requirement <id>` (or the covering integration); this appends proof receipts idempotently and preserves history. If `coverage_depth_review` conflicts with a coverage row whose `proofStages.passingE2e.status` is `passed`, report the diagnostic as a stale heuristic and keep any independent proof gaps unresolved. For `coarse_anchor_only_review`, the requirement is implemented only by whole-file anchors: link the functions, methods or types that implement it (with `covered_by` to their tests) so its `tested` evidence is tied to that code.
148
148
 
149
149
  ## Creating a New Feature
150
150
  ```
@@ -172,8 +172,8 @@ Do not create a test-fact pair. Facts describe invariants; requirements or scena
172
172
 
173
173
  1. Confirm the exact `REQ -> SCEN -> TEST` path and require typed `verification_scope: end_to_end`; direct requirement-to-test links do not satisfy the conservative scenario stage.
174
174
  2. Read `kb_status` and retain its available `proofSnapshot`. Stop if the runtime reports `unknown`; proof must fail closed when the code identity cannot be computed.
175
- 3. Run the exact E2E command against that snapshot. Record runner, command, start/finish timestamps, outcome, an environment SHA-256, and an artifact/output SHA-256. Do not mint a passed receipt from an authored test status or from an unexecuted assertion.
176
- 4. Preserve every existing receipt byte-for-byte and append the derived `kibi.proof-receipt.v1` object with strictly later `finished_at`. Earlier receipts may bind older contracts or fingerprints; they remain audit history but cannot prove the current contract. Mutation and incremental sync reject history removal, rewriting, and reordering.
175
+ 3. Run `kibi prove --test TEST-<id>` (or `--requirement`, `--integration`, `--all`). It runs the configured producer once against that snapshot and appends a `kibi.proof-receipt.v2` receipt per evaluated contract. Never hand-write a receipt, and never mint a passed receipt from an authored test status or from an unexecuted assertion.
176
+ 4. Receipts are append-only. Earlier receipts, including `kibi.proof-receipt.v1` ones, may bind older contracts or fingerprints; they remain audit history but cannot prove the current contract. Mutation and incremental sync reject history removal, rewriting, and reordering.
177
177
  5. Re-read `kb_status`; if the snapshot changed during the run, discard the candidate as proof and rerun against the new snapshot. Then run `kb_coverage` and inspect `proofStages.passingE2e.receiptEvidence` plus gap codes.
178
178
 
179
179
  Only the newest receipt matching the live snapshot, current contract hash, and current execution fingerprint qualifies, and it must be passed, no more than seven days old, and no more than five minutes in the future. Wrong-snapshot and older-contract history is retained but cannot prove the current test. `missing_proof_receipt`, `stale_proof_receipt`, `failed_proof_receipt`, `invalid_proof_receipt`, `proof_contract_mismatch`, and `proof_snapshot_unavailable` are repair states, not warnings to waive.
@@ -203,7 +203,7 @@ h1 span {
203
203
  }
204
204
  .metrics {
205
205
  display: grid;
206
- grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
206
+ grid-template-columns: repeat(6, minmax(0, 1fr));
207
207
  overflow: hidden;
208
208
  margin: 0 0 62px;
209
209
  border: 1px solid var(--line);
@@ -217,9 +217,13 @@ h1 span {
217
217
  border-right: 1px solid var(--line);
218
218
  border-bottom: 1px solid var(--line);
219
219
  }
220
- .metric:last-child {
220
+ /* Twelve tiles: two full rows of six, four of three, or six of two. */
221
+ .metric:nth-child(6n) {
221
222
  border-right: 0;
222
223
  }
224
+ .metric:nth-last-child(-n + 6) {
225
+ border-bottom: 0;
226
+ }
223
227
  .metric span {
224
228
  display: block;
225
229
  min-height: 32px;
@@ -363,6 +367,24 @@ h1 span {
363
367
  text-transform: uppercase;
364
368
  letter-spacing: .06em;
365
369
  }
370
+ .claims-proved {
371
+ margin-left: 6px;
372
+ opacity: 0.75;
373
+ font-weight: 400;
374
+ }
375
+ .evidence-floor {
376
+ margin-left: 6px;
377
+ font-weight: 400;
378
+ opacity: 0.75;
379
+ }
380
+ .evidence-floor--below {
381
+ color: var(--red);
382
+ opacity: 1;
383
+ }
384
+ .evidence-floor--pending_reproof {
385
+ color: var(--amber);
386
+ opacity: 1;
387
+ }
366
388
  .requirement__id {
367
389
  margin-bottom: 7px;
368
390
  color: var(--muted);
@@ -392,6 +414,11 @@ h1 span {
392
414
  color: var(--green);
393
415
  background: rgba(98, 230, 167, 0.08);
394
416
  }
417
+ .proof-badge--proved {
418
+ border-color: rgba(98, 230, 167, 0.45);
419
+ color: var(--green);
420
+ background: rgba(98, 230, 167, 0.16);
421
+ }
395
422
  .proof-badge--unresolved {
396
423
  border-color: rgba(255, 125, 144, 0.25);
397
424
  color: var(--red);
@@ -529,13 +556,17 @@ footer {
529
556
  min-height: 290px;
530
557
  }
531
558
  .metrics {
532
- grid-template-columns: repeat(3, 1fr);
559
+ grid-template-columns: repeat(3, minmax(0, 1fr));
533
560
  }
534
- .metric:nth-child(3) {
561
+ .metric {
562
+ border-right: 1px solid var(--line);
563
+ border-bottom: 1px solid var(--line);
564
+ }
565
+ .metric:nth-child(3n) {
535
566
  border-right: 0;
536
567
  }
537
- .metric:nth-child(-n + 3) {
538
- border-bottom: 1px solid var(--line);
568
+ .metric:nth-last-child(-n + 3) {
569
+ border-bottom: 0;
539
570
  }
540
571
  }
541
572
  @media (max-width: 760px) {
@@ -572,9 +603,10 @@ footer {
572
603
  }
573
604
  @media (max-width: 520px) {
574
605
  .metrics {
575
- grid-template-columns: repeat(2, 1fr);
606
+ grid-template-columns: repeat(2, minmax(0, 1fr));
576
607
  }
577
608
  .metric {
609
+ border-right: 1px solid var(--line);
578
610
  border-bottom: 1px solid var(--line);
579
611
  }
580
612
  .metric:nth-child(2n) {
@@ -825,7 +857,7 @@ h1 {
825
857
  }
826
858
  .proof-rail {
827
859
  display: grid;
828
- grid-template-columns: repeat(5, minmax(0, 1fr));
860
+ grid-template-columns: repeat(6, minmax(0, 1fr));
829
861
  margin: 0;
830
862
  padding: 0;
831
863
  list-style: none;
@@ -849,7 +881,6 @@ h1 {
849
881
  text-align: left;
850
882
  cursor: pointer;
851
883
  }
852
- .proof-gate:last-child,
853
884
  .proof-rail > li:last-child .proof-gate {
854
885
  padding-right: 0;
855
886
  }
@@ -882,6 +913,33 @@ h1 {
882
913
  color: var(--danger);
883
914
  background: var(--carbon);
884
915
  }
916
+ .proof-gate:disabled {
917
+ cursor: default;
918
+ }
919
+ .gate-status {
920
+ display: flex;
921
+ gap: 10px;
922
+ align-items: center;
923
+ margin: 0 0 14px;
924
+ color: var(--mist);
925
+ font-size: 13px;
926
+ scroll-margin-top: 110px;
927
+ }
928
+ .gate-status[hidden] {
929
+ display: none;
930
+ }
931
+ .gate-status__clear {
932
+ padding: 4px 10px;
933
+ border: 1px solid var(--line);
934
+ border-radius: 999px;
935
+ color: var(--ice);
936
+ background: transparent;
937
+ font: inherit;
938
+ cursor: pointer;
939
+ }
940
+ .proof-gate--optional {
941
+ border-top-style: dashed;
942
+ }
885
943
  .proof-gate__count {
886
944
  font: 750 28px / 1 var(--mono);
887
945
  letter-spacing: -.05em;
@@ -1036,6 +1094,11 @@ h1 {
1036
1094
  color: var(--success);
1037
1095
  background: rgba(99, 201, 154, 0.07);
1038
1096
  }
1097
+ .proof-badge--proved {
1098
+ border-color: rgba(99, 201, 154, 0.55);
1099
+ color: var(--success);
1100
+ background: rgba(99, 201, 154, 0.16);
1101
+ }
1039
1102
  .proof-badge--unresolved {
1040
1103
  border-color: rgba(240, 113, 120, 0.3);
1041
1104
  color: var(--danger);
@@ -1043,6 +1106,9 @@ h1 {
1043
1106
  }
1044
1107
  .stages {
1045
1108
  grid-template-columns: repeat(5, minmax(0, 1fr));
1109
+ }
1110
+ .stages:has(> :nth-child(6)) {
1111
+ grid-template-columns: repeat(6, minmax(0, 1fr));
1046
1112
  gap: 0;
1047
1113
  }
1048
1114
  .stage {
@@ -1132,7 +1198,7 @@ footer {
1132
1198
  }
1133
1199
  @media (max-width: 960px) {
1134
1200
  .proof-rail {
1135
- grid-template-columns: repeat(5, 180px);
1201
+ grid-template-columns: repeat(6, 180px);
1136
1202
  overflow-x: auto;
1137
1203
  padding-top: 8px;
1138
1204
  }
@@ -1178,7 +1244,8 @@ footer {
1178
1244
  .proof-path__header p {
1179
1245
  text-align: left;
1180
1246
  }
1181
- .stages {
1247
+ .stages,
1248
+ .stages:has(> :nth-child(6)) {
1182
1249
  grid-template-columns: 1fr;
1183
1250
  }
1184
1251
  .stage {
@@ -1245,3 +1312,8 @@ footer {
1245
1312
  color: inherit;
1246
1313
  }
1247
1314
  }
1315
+ .kb-certificates {
1316
+ margin: 14px 0 28px;
1317
+ color: var(--muted);
1318
+ font-size: 13px;
1319
+ }
@@ -8,14 +8,22 @@ export type HtmlReportCoverage = Readonly<{
8
8
  rows: readonly UnknownRecord[];
9
9
  meta?: UnknownRecord;
10
10
  }>;
11
+ /** A kibi.certificates.v1 bundle published next to the report. */
12
+ export type HtmlReportKbCertificates = Readonly<{
13
+ count: number;
14
+ kinds: Readonly<Record<string, number>>;
15
+ href: string;
16
+ }>;
11
17
  export type HtmlReportInput = Readonly<{
12
18
  requirements: HtmlReportCoverage;
13
19
  symbols: HtmlReportCoverage;
14
20
  branch: string;
15
21
  generatedAt: Date;
16
22
  repository?: ReportRepository;
23
+ kbCertificates?: HtmlReportKbCertificates;
17
24
  }>;
18
25
  export declare function firstFailingProofGate(gates: readonly ProofGateKey[], passes: (gate: ProofGateKey) => boolean): ProofGateKey | "tested";
19
26
  export declare function earliestUnmetGate(row: UnknownRecord): ProofGateKey | "tested";
27
+ export declare function certificateRejectionLines(row: UnknownRecord): readonly string[];
20
28
  export declare function renderHtmlReport(input: HtmlReportInput): string;
21
29
  //# sourceMappingURL=html-report.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"html-report.d.ts","sourceRoot":"","sources":["../../src/report/html-report.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,gBAAgB,EAMtB,MAAM,iBAAiB,CAAC;AAGzB,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAuB9D,eAAO,MAAM,UAAU,6FACqE,CAAC;AAG7F,eAAO,MAAM,wBAAwB,gEAC0B,CAAC;AAEhE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,OAAO,EAAE,aAAa,CAAC;IACvB,IAAI,EAAE,SAAS,aAAa,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB,CAAC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,YAAY,EAAE,kBAAkB,CAAC;IACjC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,IAAI,CAAC;IAClB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B,CAAC,CAAC;AAkNH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,YAAY,EAAE,EAC9B,MAAM,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,GACtC,YAAY,GAAG,QAAQ,CAKzB;AAID,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,YAAY,GAAG,QAAQ,CAM7E;AAqZD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAuM/D"}
1
+ {"version":3,"file":"html-report.d.ts","sourceRoot":"","sources":["../../src/report/html-report.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,YAAY,EAGlB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,gBAAgB,EAMtB,MAAM,iBAAiB,CAAC;AAGzB,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAuB9D,eAAO,MAAM,UAAU,6FACqE,CAAC;AAG7F,eAAO,MAAM,wBAAwB,gEAC0B,CAAC;AAEhE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC;IACxC,OAAO,EAAE,aAAa,CAAC;IACvB,IAAI,EAAE,SAAS,aAAa,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB,CAAC,CAAC;AAEH,kEAAkE;AAClE,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACxC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,YAAY,EAAE,kBAAkB,CAAC;IACjC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,IAAI,CAAC;IAClB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,cAAc,CAAC,EAAE,wBAAwB,CAAC;CAC3C,CAAC,CAAC;AA2NH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,YAAY,EAAE,EAC9B,MAAM,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,GACtC,YAAY,GAAG,QAAQ,CAKzB;AAID,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,YAAY,GAAG,QAAQ,CAM7E;AAgYD,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,aAAa,GACjB,SAAS,MAAM,EAAE,CAWnB;AA2MD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CA+N/D"}