kibi-cli 2.36.0 → 2.39.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 (224) 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-operation-metadata.d.ts +1 -1
  4. package/dist/cli-operation-metadata.js +1 -1
  5. package/dist/cli-register-foundation.d.ts.map +1 -1
  6. package/dist/cli-register-foundation.js +2 -1
  7. package/dist/cli-register-maintenance.d.ts.map +1 -1
  8. package/dist/cli-register-maintenance.js +5 -0
  9. package/dist/cli-register-reporting.d.ts.map +1 -1
  10. package/dist/cli-register-reporting.js +1 -0
  11. package/dist/cli-validate.d.ts.map +1 -1
  12. package/dist/cli-validate.js +21 -2
  13. package/dist/cli.d.ts.map +1 -1
  14. package/dist/cli.js +19 -1
  15. package/dist/commands/aggregated-checks.d.ts.map +1 -1
  16. package/dist/commands/aggregated-checks.js +89 -16
  17. package/dist/commands/coverage.d.ts +1 -0
  18. package/dist/commands/coverage.d.ts.map +1 -1
  19. package/dist/commands/coverage.js +40 -0
  20. package/dist/commands/doctor.d.ts +5 -0
  21. package/dist/commands/doctor.d.ts.map +1 -1
  22. package/dist/commands/doctor.js +70 -35
  23. package/dist/commands/github-init.d.ts.map +1 -1
  24. package/dist/commands/github-init.js +4 -2
  25. package/dist/commands/hook-managers.d.ts +43 -0
  26. package/dist/commands/hook-managers.d.ts.map +1 -0
  27. package/dist/commands/hook-managers.js +426 -0
  28. package/dist/commands/init.d.ts +1 -0
  29. package/dist/commands/init.d.ts.map +1 -1
  30. package/dist/commands/init.js +40 -5
  31. package/dist/commands/migrate.d.ts.map +1 -1
  32. package/dist/commands/migrate.js +9 -3
  33. package/dist/commands/sync/persistence.d.ts.map +1 -1
  34. package/dist/commands/sync/persistence.js +49 -1
  35. package/dist/commands/telemetry.d.ts +7 -0
  36. package/dist/commands/telemetry.d.ts.map +1 -0
  37. package/dist/commands/telemetry.js +23 -0
  38. package/dist/decision-firmness.d.ts.map +1 -1
  39. package/dist/decision-firmness.js +11 -14
  40. package/dist/engine-limits.d.ts.map +1 -1
  41. package/dist/engine-limits.js +8 -10
  42. package/dist/entity-body-context.d.ts.map +1 -1
  43. package/dist/entity-body-context.js +39 -36
  44. package/dist/extractors/markdown.d.ts +6 -0
  45. package/dist/extractors/markdown.d.ts.map +1 -1
  46. package/dist/extractors/markdown.js +21 -0
  47. package/dist/extractors/symbol-coordinates.d.ts.map +1 -1
  48. package/dist/extractors/symbol-coordinates.js +23 -4
  49. package/dist/firm-decision-edit.d.ts.map +1 -1
  50. package/dist/firm-decision-edit.js +1 -3
  51. package/dist/intent-search.d.ts +5 -1
  52. package/dist/intent-search.d.ts.map +1 -1
  53. package/dist/intent-search.js +118 -33
  54. package/dist/logic/ir.d.ts.map +1 -1
  55. package/dist/logic/ir.js +82 -108
  56. package/dist/operations/bootstrap/discovery-evidence.d.ts.map +1 -1
  57. package/dist/operations/bootstrap/discovery-evidence.js +44 -2
  58. package/dist/operations/bootstrap/discovery.d.ts.map +1 -1
  59. package/dist/operations/bootstrap/discovery.js +1 -0
  60. package/dist/operations/bootstrap/guidance-actions.d.ts.map +1 -1
  61. package/dist/operations/bootstrap/guidance-actions.js +2 -1
  62. package/dist/operations/bootstrap/plugin-offers.d.ts +11 -2
  63. package/dist/operations/bootstrap/plugin-offers.d.ts.map +1 -1
  64. package/dist/operations/bootstrap/plugin-offers.js +48 -9
  65. package/dist/operations/proof/claim-bindings.d.ts.map +1 -1
  66. package/dist/operations/proof/claim-bindings.js +1 -0
  67. package/dist/operations/proof/code-certificates.d.ts +2 -0
  68. package/dist/operations/proof/code-certificates.d.ts.map +1 -1
  69. package/dist/operations/proof/code-certificates.js +34 -14
  70. package/dist/operations/proof/code-models.d.ts.map +1 -1
  71. package/dist/operations/proof/code-models.js +19 -5
  72. package/dist/operations/proof/code-runner.d.ts +16 -0
  73. package/dist/operations/proof/code-runner.d.ts.map +1 -1
  74. package/dist/operations/proof/code-runner.js +42 -6
  75. package/dist/operations/proof/explain.d.ts +63 -0
  76. package/dist/operations/proof/explain.d.ts.map +1 -1
  77. package/dist/operations/proof/explain.js +162 -0
  78. package/dist/operations/semantic-advisor/analyze-prose.d.ts +9 -1
  79. package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -1
  80. package/dist/operations/semantic-advisor/analyze-prose.js +21 -0
  81. package/dist/operations/semantic-advisor/case-preview.d.ts +24 -0
  82. package/dist/operations/semantic-advisor/case-preview.d.ts.map +1 -0
  83. package/dist/operations/semantic-advisor/case-preview.js +216 -0
  84. package/dist/operations/semantic-advisor/shared.d.ts.map +1 -1
  85. package/dist/operations/semantic-advisor/shared.js +3 -0
  86. package/dist/operations/semantic-advisor/types.d.ts +23 -0
  87. package/dist/operations/semantic-advisor/types.d.ts.map +1 -1
  88. package/dist/plugins/approved-source-analyzers.generated.d.ts +11 -8
  89. package/dist/plugins/approved-source-analyzers.generated.d.ts.map +1 -1
  90. package/dist/plugins/approved-source-analyzers.generated.js +11 -8
  91. package/dist/plugins/compose-search-hints.d.ts +29 -0
  92. package/dist/plugins/compose-search-hints.d.ts.map +1 -0
  93. package/dist/plugins/compose-search-hints.js +94 -0
  94. package/dist/plugins/external-allowlist.d.ts +7 -0
  95. package/dist/plugins/external-allowlist.d.ts.map +1 -1
  96. package/dist/plugins/external-allowlist.js +11 -0
  97. package/dist/plugins/registry.d.ts +8 -1
  98. package/dist/plugins/registry.d.ts.map +1 -1
  99. package/dist/plugins/registry.js +22 -3
  100. package/dist/plugins/source-classification.d.ts +2 -2
  101. package/dist/plugins/source-classification.d.ts.map +1 -1
  102. package/dist/plugins/source-classification.js +25 -1
  103. package/dist/prolog/codec.d.ts.map +1 -1
  104. package/dist/prolog/codec.js +10 -20
  105. package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -1
  106. package/dist/public/impact/coverage-depth-quality.js +32 -16
  107. package/dist/public/impact/full-kb-quality.d.ts +6 -0
  108. package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
  109. package/dist/public/impact/full-kb-quality.js +8 -3
  110. package/dist/public/impact/requirement-quality.d.ts.map +1 -1
  111. package/dist/public/impact/requirement-quality.js +56 -29
  112. package/dist/public/operations/catalog.d.ts +44 -4
  113. package/dist/public/operations/catalog.d.ts.map +1 -1
  114. package/dist/public/operations/check-executor.d.ts +6 -0
  115. package/dist/public/operations/check-executor.d.ts.map +1 -1
  116. package/dist/public/operations/check-executor.js +34 -2
  117. package/dist/public/operations/discovery-executors.d.ts +5 -1
  118. package/dist/public/operations/discovery-executors.d.ts.map +1 -1
  119. package/dist/public/operations/discovery-executors.js +65 -4
  120. package/dist/public/operations/evidence-floor.d.ts +8 -1
  121. package/dist/public/operations/evidence-floor.d.ts.map +1 -1
  122. package/dist/public/operations/evidence-floor.js +3 -4
  123. package/dist/public/operations/migration-plan.d.ts.map +1 -1
  124. package/dist/public/operations/migration-plan.js +41 -10
  125. package/dist/public/operations/node-ports.d.ts.map +1 -1
  126. package/dist/public/operations/node-ports.js +3 -1
  127. package/dist/public/operations/repair-plan.d.ts +46 -0
  128. package/dist/public/operations/repair-plan.d.ts.map +1 -1
  129. package/dist/public/operations/repair-plan.js +110 -1
  130. package/dist/public/operations/schema6-check-actions.js +1 -1
  131. package/dist/public/operations/source-analysis-cache.d.ts +22 -0
  132. package/dist/public/operations/source-analysis-cache.d.ts.map +1 -0
  133. package/dist/public/operations/source-analysis-cache.js +157 -0
  134. package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
  135. package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
  136. package/dist/public/operations/specs/check-rules.generated.js +2 -1
  137. package/dist/public/operations/specs/check.d.ts +1 -1
  138. package/dist/public/operations/specs/discovery.d.ts +7 -2
  139. package/dist/public/operations/specs/discovery.d.ts.map +1 -1
  140. package/dist/public/operations/specs/discovery.js +7 -2
  141. package/dist/public/operations/specs/mutation-schemas.d.ts +36 -1
  142. package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
  143. package/dist/public/operations/specs/mutation-schemas.js +30 -0
  144. package/dist/public/operations/specs/upsert.d.ts +36 -1
  145. package/dist/public/operations/specs/upsert.d.ts.map +1 -1
  146. package/dist/public/operations/symbol-granularity-check.d.ts +3 -1
  147. package/dist/public/operations/symbol-granularity-check.d.ts.map +1 -1
  148. package/dist/public/operations/symbol-granularity-check.js +21 -7
  149. package/dist/public/proof-protocol.d.ts +6 -1
  150. package/dist/public/proof-protocol.d.ts.map +1 -1
  151. package/dist/public/proof-protocol.js +12 -3
  152. package/dist/public/proof-sources.d.ts +2 -0
  153. package/dist/public/proof-sources.d.ts.map +1 -1
  154. package/dist/public/proof-sources.js +32 -6
  155. package/dist/public/schemas/entity.d.ts.map +1 -1
  156. package/dist/public/schemas/entity.js +59 -0
  157. package/dist/public/skills/kibi-bootstrap/SKILL.md +2 -2
  158. package/dist/public/skills/kibi-commit-review/SKILL.md +6 -2
  159. package/dist/public/skills/kibi-decisions/SKILL.md +7 -2
  160. package/dist/public/skills/kibi-decisions/resources/signoff-views.md +3 -1
  161. package/dist/public/skills/kibi-usage/SKILL.md +50 -3
  162. package/dist/public/skills/kibi-usage/resources/fact-lanes.md +34 -0
  163. package/dist/public/skills/kibi-usage/resources/proof.md +13 -5
  164. package/dist/public/skills/kibi-usage/resources/workflows.md +10 -0
  165. package/dist/relationships/shards.d.ts +2 -0
  166. package/dist/relationships/shards.d.ts.map +1 -1
  167. package/dist/relationships/shards.js +25 -1
  168. package/dist/schemas/entity.schema.json +98 -1
  169. package/dist/search-answer.d.ts +3 -2
  170. package/dist/search-answer.d.ts.map +1 -1
  171. package/dist/search-answer.js +57 -4
  172. package/dist/search-hints.d.ts +58 -0
  173. package/dist/search-hints.d.ts.map +1 -0
  174. package/dist/search-hints.js +187 -0
  175. package/dist/search-ranking.d.ts +7 -0
  176. package/dist/search-ranking.d.ts.map +1 -1
  177. package/dist/search-ranking.js +54 -56
  178. package/dist/search-token-cache.d.ts +30 -0
  179. package/dist/search-token-cache.d.ts.map +1 -0
  180. package/dist/search-token-cache.js +86 -0
  181. package/dist/traceability/impact-knowledge.d.ts.map +1 -1
  182. package/dist/traceability/impact-knowledge.js +2 -0
  183. package/dist/traceability/temp-kb.d.ts.map +1 -1
  184. package/dist/traceability/temp-kb.js +11 -1
  185. package/dist/types/entities.d.ts +12 -0
  186. package/dist/types/entities.d.ts.map +1 -1
  187. package/dist/usage-telemetry.d.ts +20 -0
  188. package/dist/usage-telemetry.d.ts.map +1 -0
  189. package/dist/usage-telemetry.js +93 -0
  190. package/dist/utils/branch-resolver.d.ts.map +1 -1
  191. package/dist/utils/branch-resolver.js +1 -0
  192. package/dist/utils/rule-registry.generated.d.ts +5 -0
  193. package/dist/utils/rule-registry.generated.d.ts.map +1 -1
  194. package/dist/utils/rule-registry.generated.js +6 -0
  195. package/package.json +5 -4
  196. package/schema/entities.pl +12 -0
  197. package/src/public/impact/coverage-depth-quality.ts +59 -21
  198. package/src/public/impact/full-kb-quality.ts +15 -1
  199. package/src/public/impact/requirement-quality.ts +95 -38
  200. package/src/public/operations/check-executor.ts +41 -1
  201. package/src/public/operations/discovery-executors.ts +92 -4
  202. package/src/public/operations/evidence-floor.ts +15 -3
  203. package/src/public/operations/migration-plan.ts +41 -9
  204. package/src/public/operations/node-ports.ts +3 -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/source-analysis-cache.ts +196 -0
  208. package/src/public/operations/specs/check-rules.generated.ts +2 -1
  209. package/src/public/operations/specs/discovery.ts +8 -2
  210. package/src/public/operations/specs/mutation-schemas.ts +34 -0
  211. package/src/public/operations/symbol-granularity-check.ts +25 -5
  212. package/src/public/proof-protocol-types.d.ts +1 -1
  213. package/src/public/proof-protocol.ts +18 -4
  214. package/src/public/proof-sources.ts +37 -6
  215. package/src/public/schemas/entity.ts +65 -0
  216. package/src/public/skills/kibi-bootstrap/SKILL.md +2 -2
  217. package/src/public/skills/kibi-commit-review/SKILL.md +6 -2
  218. package/src/public/skills/kibi-decisions/SKILL.md +7 -2
  219. package/src/public/skills/kibi-decisions/resources/signoff-views.md +3 -1
  220. package/src/public/skills/kibi-usage/SKILL.md +50 -3
  221. package/src/public/skills/kibi-usage/resources/fact-lanes.md +34 -0
  222. package/src/public/skills/kibi-usage/resources/proof.md +13 -5
  223. package/src/public/skills/kibi-usage/resources/workflows.md +10 -0
  224. package/src/schemas/entity.schema.json +98 -1
@@ -56,6 +56,27 @@ declare const REPAIR_PHASES: {
56
56
  readonly validationRules: readonly ["must-priority-coverage", "no-dangling-refs"];
57
57
  readonly writePolicy: "sequential_upsert";
58
58
  };
59
+ readonly dimension_grounding: {
60
+ readonly order: 64;
61
+ readonly objective: "Ground each quantified claim (each, every, all, or a cardinality bound) on what varies: an integer count or bound, a set of members, a rule over a variable, or a state machine. If the quantifier ranges over nothing, record a dimension_waiver on the grounding fact for a person to approve, and record their approval in the same pull request.";
62
+ readonly workflowSteps: readonly ["kb_model_requirement", "kb_validate_upsert", "kb_upsert", "kb_check"];
63
+ readonly validationRules: readonly ["no-dangling-refs"];
64
+ readonly writePolicy: "sequential_upsert";
65
+ };
66
+ readonly case_scenarios: {
67
+ readonly order: 66;
68
+ readonly objective: "Cover each uncovered rejection case: add a scenario whose assumes fact states the case's assumption (a value past the bound, a value outside the set), expects rejection or error, is linked with specified_by and is verified by a passing end-to-end test. Each repair lists caseSkeletons, upsert-ready draft scenarios and their assumed facts: fill in the placeholders, verify the scenario by a test, then set its status to active (a draft never covers a case). If a person accepts the cases as covered another way, record a case_waiver on the grounding fact for them to approve, and record their approval in the same pull request.";
69
+ readonly workflowSteps: readonly ["kb_coverage", "kb_validate_upsert", "kb_upsert", "kb_check"];
70
+ readonly validationRules: readonly ["scenario-outcome-mismatch", "no-dangling-refs"];
71
+ readonly writePolicy: "sequential_upsert";
72
+ };
73
+ readonly negative_scenarios: {
74
+ readonly order: 65;
75
+ readonly objective: "Add a scenario that expects rejection or error and assumes a value the requirement forbids (see suggestedNegatives), link it with specified_by and verify it with a passing end-to-end test.";
76
+ readonly workflowSteps: readonly ["kb_query", "kb_validate_upsert", "kb_upsert", "kb_check"];
77
+ readonly validationRules: readonly ["scenario-outcome-mismatch", "no-dangling-refs"];
78
+ readonly writePolicy: "sequential_upsert";
79
+ };
59
80
  readonly scenario_tests: {
60
81
  readonly order: 70;
61
82
  readonly objective: "Create or select a test endpoint and link it through the requirement scenario.";
@@ -121,6 +142,31 @@ export type RepairPlanRepair = {
121
142
  readonly proofStage: string;
122
143
  readonly action: string;
123
144
  readonly evidence: Readonly<Record<string, unknown>>;
145
+ /** Draft scenarios for an uncovered_case repair, one per uncovered case. */
146
+ readonly caseSkeletons?: readonly CaseSkeleton[];
147
+ };
148
+ type SkeletonEntity = {
149
+ readonly type: "fact" | "scenario";
150
+ readonly id: string;
151
+ readonly properties: Readonly<Record<string, unknown>>;
152
+ readonly relationships: readonly {
153
+ readonly type: string;
154
+ readonly from: string;
155
+ readonly to: string;
156
+ }[];
157
+ };
158
+ /**
159
+ * An upsert-ready draft scenario for one uncovered case: the fact it assumes
160
+ * (the case's value class) and the scenario that expects the predicted
161
+ * outcome. Drafts never count as coverage, so writing one changes no gap
162
+ * until it is verified and made active. placeholder is true when the value
163
+ * must be chosen by the author (a value outside a set).
164
+ */
165
+ export type CaseSkeleton = {
166
+ readonly caseId: string;
167
+ readonly constraint: string;
168
+ readonly placeholder: boolean;
169
+ readonly entities: readonly [SkeletonEntity, SkeletonEntity];
124
170
  };
125
171
  export type RepairPlanBatch = {
126
172
  readonly id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"repair-plan.d.ts","sourceRoot":"","sources":["../../../src/public/operations/repair-plan.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,EAAG,qBAA8B,CAAC;AAElE,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAA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AAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACxC,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;CAC9D,CAAC;AAgQF,wBAAgB,eAAe,CAC7B,OAAO,EAAE,qBAAqB,EAC9B,KAAK,EAAE,eAAe,EACtB,YAAY,EAAE,MAAM,GACnB,UAAU,GAAG,SAAS,CA4FxB"}
@@ -87,6 +87,37 @@ const REPAIR_PHASES = {
87
87
  validationRules: ["must-priority-coverage", "no-dangling-refs"],
88
88
  writePolicy: "sequential_upsert",
89
89
  },
90
+ dimension_grounding: {
91
+ order: 64,
92
+ objective: "Ground each quantified claim (each, every, all, or a cardinality bound) on what varies: an integer count or bound, a set of members, a rule over a variable, or a state machine. If the quantifier ranges over nothing, record a dimension_waiver on the grounding fact for a person to approve, and record their approval in the same pull request.",
93
+ workflowSteps: [
94
+ "kb_model_requirement",
95
+ "kb_validate_upsert",
96
+ "kb_upsert",
97
+ "kb_check",
98
+ ],
99
+ validationRules: ["no-dangling-refs"],
100
+ writePolicy: "sequential_upsert",
101
+ },
102
+ case_scenarios: {
103
+ order: 66,
104
+ objective: "Cover each uncovered rejection case: add a scenario whose assumes fact states the case's assumption (a value past the bound, a value outside the set), expects rejection or error, is linked with specified_by and is verified by a passing end-to-end test. Each repair lists caseSkeletons, upsert-ready draft scenarios and their assumed facts: fill in the placeholders, verify the scenario by a test, then set its status to active (a draft never covers a case). If a person accepts the cases as covered another way, record a case_waiver on the grounding fact for them to approve, and record their approval in the same pull request.",
105
+ workflowSteps: [
106
+ "kb_coverage",
107
+ "kb_validate_upsert",
108
+ "kb_upsert",
109
+ "kb_check",
110
+ ],
111
+ validationRules: ["scenario-outcome-mismatch", "no-dangling-refs"],
112
+ writePolicy: "sequential_upsert",
113
+ },
114
+ negative_scenarios: {
115
+ order: 65,
116
+ objective: "Add a scenario that expects rejection or error and assumes a value the requirement forbids (see suggestedNegatives), link it with specified_by and verify it with a passing end-to-end test.",
117
+ workflowSteps: ["kb_query", "kb_validate_upsert", "kb_upsert", "kb_check"],
118
+ validationRules: ["scenario-outcome-mismatch", "no-dangling-refs"],
119
+ writePolicy: "sequential_upsert",
120
+ },
90
121
  scenario_tests: {
91
122
  order: 70,
92
123
  objective: "Create or select a test endpoint and link it through the requirement scenario.",
@@ -173,6 +204,9 @@ const GAP_PHASE = {
173
204
  missing_scenario: "scenario_endpoints",
174
205
  infeasible_scenario: "scenario_endpoints",
175
206
  unknown_scenario_feasibility: "scenario_endpoints",
207
+ dimension_unrepresented: "dimension_grounding",
208
+ happy_path_only: "negative_scenarios",
209
+ uncovered_case: "case_scenarios",
176
210
  missing_scenario_test: "scenario_tests",
177
211
  proof_snapshot_unavailable: "snapshot_runtime",
178
212
  missing_passing_e2e: "proof_evidence",
@@ -201,6 +235,9 @@ const GAP_STAGE = {
201
235
  missing_scenario: "scenarios",
202
236
  infeasible_scenario: "scenarios",
203
237
  unknown_scenario_feasibility: "scenarios",
238
+ dimension_unrepresented: "dimension",
239
+ happy_path_only: "negative_path",
240
+ uncovered_case: "cases",
204
241
  missing_scenario_test: "scenario_tests",
205
242
  missing_passing_e2e: "passing_e2e",
206
243
  missing_proof_receipt: "passing_e2e",
@@ -220,6 +257,9 @@ const PROOF_STAGE_KEY = {
220
257
  contradictions: "contradictions",
221
258
  scenarios: "scenarios",
222
259
  scenario_tests: "scenarioTests",
260
+ negative_path: "negativePath",
261
+ dimension: "dimension",
262
+ cases: "cases",
223
263
  passing_e2e: "passingE2e",
224
264
  executable_symbols: "executableSymbols",
225
265
  production_symbols: "productionSymbols",
@@ -261,6 +301,71 @@ function stageEvidence(row, proofStage) {
261
301
  const stable = stableValue(evidence);
262
302
  return isRecord(stable) ? stable : {};
263
303
  }
304
+ const VALUE_FIELD = {
305
+ int: "value_int",
306
+ number: "value_number",
307
+ set: "value_set",
308
+ string: "value_string",
309
+ };
310
+ function caseSkeleton(requirementId, row) {
311
+ const caseId = typeof row.caseId === "string" ? row.caseId : undefined;
312
+ const assumption = isRecord(row.assumption) ? row.assumption : undefined;
313
+ const valueType = typeof assumption?.value_type === "string" ? assumption.value_type : "";
314
+ const valueField = VALUE_FIELD[valueType];
315
+ if (caseId === undefined || assumption === undefined || !valueField)
316
+ return undefined;
317
+ const constraint = typeof row.constraint === "string" ? row.constraint : "";
318
+ const property = typeof assumption.property_key === "string" ? assumption.property_key : "";
319
+ const expects = row.predicted === "rejection" ? "rejection" : "success";
320
+ const placeholder = JSON.stringify(assumption.value).includes("<");
321
+ const suffix = caseId.replace(/^CASE-/, "");
322
+ const factId = `FACT-CASE-${suffix}`;
323
+ const scenarioId = `SCEN-CASE-${suffix}`;
324
+ return {
325
+ caseId,
326
+ constraint,
327
+ placeholder,
328
+ entities: [
329
+ {
330
+ type: "fact",
331
+ id: factId,
332
+ properties: {
333
+ title: `${property} ${constraint}`,
334
+ status: "active",
335
+ fact_kind: "property_value",
336
+ subject_key: assumption.subject_key,
337
+ property_key: property,
338
+ operator: assumption.operator,
339
+ value_type: valueType,
340
+ [valueField]: assumption.value,
341
+ },
342
+ relationships: [],
343
+ },
344
+ {
345
+ type: "scenario",
346
+ id: scenarioId,
347
+ properties: {
348
+ title: `${property} ${constraint} is ${expects === "rejection" ? "refused" : "accepted"}`,
349
+ status: "draft",
350
+ expects,
351
+ },
352
+ relationships: [
353
+ { type: "assumes", from: scenarioId, to: factId },
354
+ { type: "specified_by", from: requirementId, to: scenarioId },
355
+ ],
356
+ },
357
+ ],
358
+ };
359
+ }
360
+ function caseSkeletons(requirementId, evidence) {
361
+ const rows = Array.isArray(evidence.uncoveredCases)
362
+ ? evidence.uncoveredCases.filter(isRecord)
363
+ : [];
364
+ return rows.flatMap((row) => {
365
+ const skeleton = caseSkeleton(requirementId, row);
366
+ return skeleton === undefined ? [] : [skeleton];
367
+ });
368
+ }
264
369
  function batchId(requirementId, phase) {
265
370
  const order = String(REPAIR_PHASES[phase].order).padStart(3, "0");
266
371
  const safeRequirementId = requirementId.replace(/[^A-Za-z0-9_-]/g, "-");
@@ -280,13 +385,17 @@ function buildRequirementBatches(row) {
280
385
  const proofStage = typeof sourceRepair?.stage === "string"
281
386
  ? sourceRepair.stage
282
387
  : (GAP_STAGE[gap] ?? "manual_review");
388
+ const evidence = stageEvidence(row, proofStage);
283
389
  const repair = {
284
390
  requirementId,
285
391
  gap,
286
392
  proofPriority: numberField(sourceRepair?.priority, REPAIR_PHASES[phase].order),
287
393
  proofStage,
288
394
  action: actionForRepair(sourceRepair, phase),
289
- evidence: stageEvidence(row, proofStage),
395
+ evidence,
396
+ ...(gap === "uncovered_case"
397
+ ? { caseSkeletons: caseSkeletons(requirementId, evidence) }
398
+ : {}),
290
399
  };
291
400
  const phaseRepairs = byPhase.get(phase) ?? [];
292
401
  phaseRepairs.push(repair);
@@ -600,7 +600,7 @@ export function schema6ReviewActionsFromCheck(diagnostics) {
600
600
  safety: "review",
601
601
  invocation: {
602
602
  kind: "review",
603
- instruction: `${total} agent-authored requirement(s) have no human approval${total > listed.length ? `; these ${listed.length} come first` : ""}: ${listed.join(", ")}. Have a person read each one; when it states the intended behavior, kb_upsert it with origin.approved_by set to the reviewer (keep kind: agent and the rest of origin). Rerun kb_check for the next page.`,
603
+ instruction: `${total} agent-authored requirement(s) have no human approval${total > listed.length ? `; these ${listed.length} come first` : ""}: ${listed.join(", ")}. Have a person read each one; when it states the intended behavior, kb_upsert it with origin.approved_by set to the reviewer (keep kind: agent and the rest of origin), in the same change and pull request as the requirement, not a separate one. Rerun kb_check for the next page.`,
604
604
  },
605
605
  affectedEntityIds: listed,
606
606
  affectedFiles: [...new Set(agentRequirementFiles)].sort(),
@@ -0,0 +1,22 @@
1
+ import type { HostSourceAnalysisResultV2 } from "../../plugins/source-analysis-service.js";
2
+ /**
3
+ * Parser-backed source analyses kept across `kibi check` runs. Parsing every
4
+ * symbol's source file was the largest client cost of a warm check, and an
5
+ * analysis is a pure function of the file's path and bytes under one
6
+ * analyzer set, so an entry is keyed by both and the whole cache by the
7
+ * analyzer set. The file lives in the branch store, which is never tracked.
8
+ */
9
+ export declare const SOURCE_ANALYSIS_CACHE_FILE = "source-analysis-cache.json";
10
+ export type SourceAnalysisCache = {
11
+ get(file: string, content: string): HostSourceAnalysisResultV2 | undefined;
12
+ set(file: string, content: string, analysis: HostSourceAnalysisResultV2): void;
13
+ /** Write the entries this run read or added, dropping the rest. */
14
+ save(): void;
15
+ };
16
+ /**
17
+ * The cache in `storeDir`, or null when the analyzer set cannot be
18
+ * fingerprinted or there is no store. Only complete (`ok`) analyses
19
+ * are kept; anything else is computed again.
20
+ */
21
+ export declare function openSourceAnalysisCache(storeDir: string | undefined, workspaceRoot: string): SourceAnalysisCache | null;
22
+ //# sourceMappingURL=source-analysis-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-analysis-cache.d.ts","sourceRoot":"","sources":["../../../src/public/operations/source-analysis-cache.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAE3F;;;;;;GAMG;AAEH,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AASvE,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,0BAA0B,GAAG,SAAS,CAAC;IAC3E,GAAG,CACD,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,0BAA0B,GACnC,IAAI,CAAC;IACR,mEAAmE;IACnE,IAAI,IAAI,IAAI,CAAC;CACd,CAAC;AAkFF;;;;GAIG;AAEH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,aAAa,EAAE,MAAM,GACpB,mBAAmB,GAAG,IAAI,CA4C5B"}
@@ -0,0 +1,157 @@
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 { createHash } from "node:crypto";
19
+ import { existsSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync, } from "node:fs";
20
+ import { createRequire } from "node:module";
21
+ import * as path from "node:path";
22
+ import { fingerprintMaintenanceSourceSet } from "../../plugins/maintenance-source-analysis.js";
23
+ import { readProjectKibiConfig } from "../../plugins/project-config.js";
24
+ /**
25
+ * Parser-backed source analyses kept across `kibi check` runs. Parsing every
26
+ * symbol's source file was the largest client cost of a warm check, and an
27
+ * analysis is a pure function of the file's path and bytes under one
28
+ * analyzer set, so an entry is keyed by both and the whole cache by the
29
+ * analyzer set. The file lives in the branch store, which is never tracked.
30
+ */
31
+ // implements REQ-cli-check
32
+ export const SOURCE_ANALYSIS_CACHE_FILE = "source-analysis-cache.json";
33
+ const SOURCE_ANALYSIS_CACHE_VERSION = 1;
34
+ function entryKey(file, content) {
35
+ return createHash("sha256")
36
+ .update(file)
37
+ .update("\0")
38
+ .update(content)
39
+ .digest("hex");
40
+ }
41
+ /**
42
+ * The builtin analyzer is identified by its package version, which a local
43
+ * build does not bump; its built files' sizes and times stand in for its
44
+ * code so a rebuilt analyzer starts a fresh cache.
45
+ */
46
+ function builtinBuildStamp() {
47
+ const hash = createHash("sha256");
48
+ try {
49
+ const manifest = createRequire(import.meta.url).resolve("kibi-plugin-builtin/package.json");
50
+ const symbolsDir = path.join(path.dirname(manifest), "dist", "symbols");
51
+ // rationale: readdir lists this directory in name order on the supported
52
+ // filesystems, so the sort only guards odd ones and no test can tell.
53
+ // Stryker disable next-line MethodExpression
54
+ for (const name of readdirSync(symbolsDir).sort()) {
55
+ const stat = statSync(path.join(symbolsDir, name));
56
+ hash.update(`${name}\0${stat.size}\0${stat.mtimeMs}\n`);
57
+ }
58
+ }
59
+ catch {
60
+ // An unavailable builtin package stamps as no built files.
61
+ }
62
+ // rationale: the stamp only feeds the analyzer-set JSON; a Buffer
63
+ // serializes as deterministically as the hex text it replaces.
64
+ // Stryker disable next-line StringLiteral
65
+ return hash.digest("hex");
66
+ }
67
+ function analyzerSetKey(workspaceRoot) {
68
+ try {
69
+ const sourceSet = fingerprintMaintenanceSourceSet(workspaceRoot, readProjectKibiConfig(workspaceRoot));
70
+ return createHash("sha256")
71
+ .update(JSON.stringify({
72
+ version: SOURCE_ANALYSIS_CACHE_VERSION,
73
+ sourceSet,
74
+ builtin: builtinBuildStamp(),
75
+ }))
76
+ .digest("hex");
77
+ }
78
+ catch {
79
+ // An analyzer set Kibi cannot fingerprint is never cached.
80
+ return null;
81
+ }
82
+ }
83
+ function readCacheFile(cachePath, analyzers) {
84
+ const empty = {
85
+ version: SOURCE_ANALYSIS_CACHE_VERSION,
86
+ analyzers,
87
+ entries: {},
88
+ };
89
+ try {
90
+ // A missing or unreadable file, or JSON null, throws and starts empty.
91
+ const parsed = JSON.parse(readFileSync(cachePath, "utf8"));
92
+ if (parsed.version !== SOURCE_ANALYSIS_CACHE_VERSION ||
93
+ parsed.analyzers !== analyzers ||
94
+ parsed.entries === null ||
95
+ typeof parsed.entries !== "object") {
96
+ return empty;
97
+ }
98
+ return parsed;
99
+ }
100
+ catch {
101
+ return empty;
102
+ }
103
+ }
104
+ /**
105
+ * The cache in `storeDir`, or null when the analyzer set cannot be
106
+ * fingerprinted or there is no store. Only complete (`ok`) analyses
107
+ * are kept; anything else is computed again.
108
+ */
109
+ // implements REQ-cli-check
110
+ export function openSourceAnalysisCache(storeDir, workspaceRoot) {
111
+ // rationale: an undefined directory does not exist either, so dropping the
112
+ // first test changes nothing observable.
113
+ // Stryker disable next-line ConditionalExpression
114
+ if (storeDir === undefined || !existsSync(storeDir))
115
+ return null;
116
+ const analyzers = analyzerSetKey(workspaceRoot);
117
+ if (analyzers === null)
118
+ return null;
119
+ const cachePath = path.join(storeDir, SOURCE_ANALYSIS_CACHE_FILE);
120
+ const stored = readCacheFile(cachePath, analyzers);
121
+ const used = {};
122
+ let changed = false;
123
+ return {
124
+ get(file, content) {
125
+ const key = entryKey(file, content);
126
+ const entry = stored.entries[key];
127
+ if (entry === undefined || entry.status !== "ok")
128
+ return undefined;
129
+ used[key] = entry;
130
+ return entry;
131
+ },
132
+ set(file, content, analysis) {
133
+ if (analysis.status !== "ok")
134
+ return;
135
+ used[entryKey(file, content)] = analysis;
136
+ changed = true;
137
+ },
138
+ save() {
139
+ const kept = Object.keys(used).length;
140
+ if (!changed && kept === Object.keys(stored.entries).length)
141
+ return;
142
+ const temporary = `${cachePath}.${process.pid}.tmp`;
143
+ try {
144
+ writeFileSync(temporary, JSON.stringify({
145
+ version: SOURCE_ANALYSIS_CACHE_VERSION,
146
+ analyzers,
147
+ entries: used,
148
+ }));
149
+ renameSync(temporary, cachePath);
150
+ }
151
+ catch {
152
+ // The cache is an optimization; a failed write only costs a reparse.
153
+ rmSync(temporary, { force: true });
154
+ }
155
+ },
156
+ };
157
+ }
@@ -1,5 +1,5 @@
1
1
  /** Every selectable kb_check rule name, registry order. */
2
2
  export declare const SELECTABLE_RULE_NAMES: readonly string[];
3
3
  /** Comma-separated "Allowed:" fragment for the kb_check rules description. */
4
- export declare const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims";
4
+ export declare const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, scenario-outcome-mismatch, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims";
5
5
  //# sourceMappingURL=check-rules.generated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-rules.generated.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/check-rules.generated.ts"],"names":[],"mappings":"AAUA,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EA0DlD,CAAC;AAGF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,wwCACkuC,CAAC"}
1
+ {"version":3,"file":"check-rules.generated.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/check-rules.generated.ts"],"names":[],"mappings":"AAUA,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EA2DlD,CAAC;AAGF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,myCAC6vC,CAAC"}
@@ -23,6 +23,7 @@ export const SELECTABLE_RULE_NAMES = [
23
23
  "superseded-requirement-open",
24
24
  "scenario-feasibility",
25
25
  "scenario-feasibility-unknown",
26
+ "scenario-outcome-mismatch",
26
27
  "exception-claim-keys",
27
28
  "numeric-string-value",
28
29
  "rule-key-arguments-missing",
@@ -69,4 +70,4 @@ export const SELECTABLE_RULE_NAMES = [
69
70
  ];
70
71
  // implements REQ-006
71
72
  /** Comma-separated "Allowed:" fragment for the kb_check rules description. */
72
- export const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims";
73
+ export const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, scenario-outcome-mismatch, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims";
@@ -12,7 +12,7 @@ export declare const checkSpec: {
12
12
  readonly type: "string";
13
13
  readonly enum: readonly string[];
14
14
  };
15
- readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
15
+ readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, symbol-granularity, no-dangling-refs, source-relationship-parity, branch-store-not-compiled, source-path-dangling, no-cycles, required-fields, deprecated-adr-no-successor, superseded-requirement-open, scenario-feasibility, scenario-feasibility-unknown, scenario-outcome-mismatch, exception-claim-keys, numeric-string-value, rule-key-arguments-missing, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, related-requirement-unmodeled, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, exception-unapproved, exception-approval-self-attested, agent-requirement-unapproved, requirement-rationale-missing, symbol-owner-superseded, adr-unlinked, adr-proposed, predicate-schema-conformance, entity-context-missing, entity-context-acknowledged, decision-firm-unreferenced, decision-firm-superseded, decision-firm-edited, supersedes-reason-missing, supersedes-reason-acknowledged, policy-ownership, policy-markers, kb-consistency, kb-consistency-unresolved, evidence-floor, proof-contract-claims. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
16
16
  };
17
17
  readonly sourceFiles: {
18
18
  readonly type: "array";
@@ -100,7 +100,7 @@ export declare const querySpec: {
100
100
  export declare const searchSpec: {
101
101
  readonly name: "kb_search";
102
102
  readonly cliName: "search";
103
- readonly description: "Ask the KB a question or search it. Default intent-v1 ranking accepts questions, host-agent semantic facets and changed-code source locations, returns evidence, abstains below its confidence threshold and adds an answer layer: the current requirements that govern the topic, what must stay true (linked facts), why (ADRs) and what verifies it (scenarios, tests). Use before changing behavior, then kb_query for exact follow-up. No mutation side effects.";
103
+ readonly description: "Ask the KB a question or search it. Default intent-v1 ranking accepts questions, host-agent semantic facets and changed-code source locations, returns evidence, abstains below its confidence threshold and adds an answer layer: the current requirements that govern the topic, what must stay true (linked facts), why (ADRs) and what verifies it (scenarios, tests). A weak answer may add queryAnalysis.hints from a search-hints plugin: requirements the question may mean, to re-ask with. Use before changing behavior, then kb_query for exact follow-up. No mutation side effects.";
104
104
  readonly businessInputSchema: {
105
105
  readonly type: "object";
106
106
  readonly required: readonly ["query"];
@@ -139,6 +139,11 @@ export declare const searchSpec: {
139
139
  readonly default: true;
140
140
  readonly description: "Intent-v1 only, first page only. When true (default) the result includes an answer layer: current governing requirements with their linked facts, scenarios, tests and ADRs, superseded requirements listed separately, and observation facts labelled as notes. Bounded in size; discovery, not proof.";
141
141
  };
142
+ readonly hints: {
143
+ readonly type: "boolean";
144
+ readonly default: true;
145
+ readonly description: "Intent-v1 only, first page only. When true (default) and the project activates a kibi.search-hints.v1 plugin, a weak or abstained answer adds queryAnalysis.hints: requirements the question may mean, to re-ask with. Hints never change results or the answer layer.";
146
+ };
142
147
  readonly semanticFacets: {
143
148
  readonly type: "object";
144
149
  readonly additionalProperties: false;
@@ -179,7 +184,7 @@ export declare const searchSpec: {
179
184
  readonly maxItems: 20;
180
185
  };
181
186
  };
182
- readonly description: "Optional host-agent semantic interpretation. Kibi uses these strings as deterministic aliases/facets; it does not call a model itself.";
187
+ readonly description: "Optional host-agent semantic interpretation. Kibi uses these strings as deterministic aliases/facets; ranking never calls a model.";
183
188
  };
184
189
  readonly sourceLocations: {
185
190
  readonly type: "array";
@@ -1 +1 @@
1
- {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,2BAA2B,CAAC;AAiCnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6GsC,CAAC;AAE7D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2GuC,CAAC;AAE/D,eAAO,MAAM,UAAU;;;;;;;;;;;;CAWuC,CAAC"}
1
+ {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,2BAA2B,CAAC;AAiCnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6GsC,CAAC;AAE7D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiHuC,CAAC;AAE/D,eAAO,MAAM,UAAU;;;;;;;;;;;;CAWuC,CAAC"}
@@ -114,7 +114,7 @@ export const querySpec = {
114
114
  export const searchSpec = {
115
115
  name: "kb_search",
116
116
  cliName: "search",
117
- description: "Ask the KB a question or search it. Default intent-v1 ranking accepts questions, host-agent semantic facets and changed-code source locations, returns evidence, abstains below its confidence threshold and adds an answer layer: the current requirements that govern the topic, what must stay true (linked facts), why (ADRs) and what verifies it (scenarios, tests). Use before changing behavior, then kb_query for exact follow-up. No mutation side effects.",
117
+ description: "Ask the KB a question or search it. Default intent-v1 ranking accepts questions, host-agent semantic facets and changed-code source locations, returns evidence, abstains below its confidence threshold and adds an answer layer: the current requirements that govern the topic, what must stay true (linked facts), why (ADRs) and what verifies it (scenarios, tests). A weak answer may add queryAnalysis.hints from a search-hints plugin: requirements the question may mean, to re-ask with. Use before changing behavior, then kb_query for exact follow-up. No mutation side effects.",
118
118
  businessInputSchema: {
119
119
  type: "object",
120
120
  required: ["query"],
@@ -153,6 +153,11 @@ export const searchSpec = {
153
153
  default: true,
154
154
  description: "Intent-v1 only, first page only. When true (default) the result includes an answer layer: current governing requirements with their linked facts, scenarios, tests and ADRs, superseded requirements listed separately, and observation facts labelled as notes. Bounded in size; discovery, not proof.",
155
155
  },
156
+ hints: {
157
+ type: "boolean",
158
+ default: true,
159
+ description: "Intent-v1 only, first page only. When true (default) and the project activates a kibi.search-hints.v1 plugin, a weak or abstained answer adds queryAnalysis.hints: requirements the question may mean, to re-ask with. Hints never change results or the answer layer.",
160
+ },
156
161
  semanticFacets: {
157
162
  type: "object",
158
163
  additionalProperties: false,
@@ -167,7 +172,7 @@ export const searchSpec = {
167
172
  },
168
173
  aliases: { type: "array", items: { type: "string" }, maxItems: 20 },
169
174
  },
170
- description: "Optional host-agent semantic interpretation. Kibi uses these strings as deterministic aliases/facets; it does not call a model itself.",
175
+ description: "Optional host-agent semantic interpretation. Kibi uses these strings as deterministic aliases/facets; ranking never calls a model.",
171
176
  },
172
177
  sourceLocations: {
173
178
  type: "array",
@@ -118,6 +118,16 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
118
118
  readonly minLength: 1;
119
119
  readonly description: "Requirement-only. Optional reference to the exception's approval decision record.";
120
120
  };
121
+ readonly failure_side_waiver: {
122
+ readonly type: "string";
123
+ readonly minLength: 1;
124
+ 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.";
125
+ };
126
+ readonly failure_side_waiver_approved_by: {
127
+ readonly type: "string";
128
+ readonly minLength: 1;
129
+ readonly description: "Requirement-only. The person who accepted failure_side_waiver.";
130
+ };
121
131
  readonly firmness: {
122
132
  readonly type: "string";
123
133
  readonly enum: readonly ["firm", "default", "exploratory"];
@@ -240,6 +250,11 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
240
250
  readonly minLength: 1;
241
251
  readonly description: "The name the domain is exported under in the symbol's source file, when the symbol's title is not that name.";
242
252
  };
253
+ readonly field: {
254
+ readonly type: "string";
255
+ readonly minLength: 1;
256
+ 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).";
257
+ };
243
258
  };
244
259
  readonly additionalProperties: false;
245
260
  };
@@ -267,7 +282,7 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
267
282
  };
268
283
  readonly value_source: {
269
284
  readonly type: "array";
270
- readonly description: "arithmetic and smt: code constants the assumptions read. Kibi evaluates each export at ingest and requires the certificate to assume the variable equals that value, so the proof is about the code and not only the knowledge base. With measure count the value is the size of a list, set, map or object export, so a count claim reads the collection itself. An entry {source, measure: count} counts the members Kibi reads from a project source (routes, tables, environment variables).";
285
+ readonly description: "arithmetic and smt: code constants the assumptions read. Kibi evaluates each export at ingest and requires the certificate to assume the variable equals that value, so the proof is about the code and not only the knowledge base. With measure count the value is the size of a list, set, map or object export, so a count claim reads the collection itself. A dotted export (POLICY.eventLimit) reads one field of an object export. An entry {source, measure: count} counts the members Kibi reads from a project source (routes, tables, environment variables).";
271
286
  readonly minItems: 1;
272
287
  readonly items: {
273
288
  readonly type: "object";
@@ -815,6 +830,26 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
815
830
  readonly type: "string";
816
831
  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.";
817
832
  };
833
+ readonly dimension_waiver: {
834
+ readonly type: "string";
835
+ readonly minLength: 1;
836
+ 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.";
837
+ };
838
+ readonly dimension_waiver_approved_by: {
839
+ readonly type: "string";
840
+ readonly minLength: 1;
841
+ readonly description: "Fact-only. The person who accepted dimension_waiver.";
842
+ };
843
+ readonly case_waiver: {
844
+ readonly type: "string";
845
+ readonly minLength: 1;
846
+ 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.";
847
+ };
848
+ readonly case_waiver_approved_by: {
849
+ readonly type: "string";
850
+ readonly minLength: 1;
851
+ readonly description: "Fact-only. The person who accepted case_waiver.";
852
+ };
818
853
  readonly predicate_name: {
819
854
  readonly type: "string";
820
855
  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":"mutation-schemas.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/mutation-schemas.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,YAAY,gFASf,CAAC;AA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