kibi-cli 2.1.0 → 2.2.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 (246) hide show
  1. package/dist/cli-protocol.d.ts.map +1 -1
  2. package/dist/cli-protocol.js +3 -2
  3. package/dist/commands/aggregated-checks.d.ts +7 -0
  4. package/dist/commands/aggregated-checks.d.ts.map +1 -1
  5. package/dist/commands/aggregated-checks.js +25 -1
  6. package/dist/commands/check.d.ts.map +1 -1
  7. package/dist/commands/check.js +21 -13
  8. package/dist/commands/doctor.d.ts.map +1 -1
  9. package/dist/commands/doctor.js +105 -24
  10. package/dist/commands/github-init.d.ts +1 -1
  11. package/dist/commands/github-init.d.ts.map +1 -1
  12. package/dist/commands/github-init.js +1 -1
  13. package/dist/commands/init-helpers.d.ts +17 -2
  14. package/dist/commands/init-helpers.d.ts.map +1 -1
  15. package/dist/commands/init-helpers.js +123 -23
  16. package/dist/commands/init.d.ts.map +1 -1
  17. package/dist/commands/init.js +110 -15
  18. package/dist/commands/prove.d.ts.map +1 -1
  19. package/dist/commands/prove.js +10 -18
  20. package/dist/commands/sync/cache.d.ts +20 -1
  21. package/dist/commands/sync/cache.d.ts.map +1 -1
  22. package/dist/commands/sync/cache.js +51 -2
  23. package/dist/commands/sync/discovery.d.ts.map +1 -1
  24. package/dist/commands/sync/discovery.js +1 -1
  25. package/dist/commands/sync/persistence.d.ts.map +1 -1
  26. package/dist/commands/sync/persistence.js +8 -0
  27. package/dist/commands/sync.d.ts.map +1 -1
  28. package/dist/commands/sync.js +11 -3
  29. package/dist/engine.d.ts +26 -0
  30. package/dist/engine.d.ts.map +1 -1
  31. package/dist/engine.js +126 -29
  32. package/dist/extractors/manifest.d.ts.map +1 -1
  33. package/dist/extractors/manifest.js +66 -28
  34. package/dist/extractors/markdown.d.ts +2 -0
  35. package/dist/extractors/markdown.d.ts.map +1 -1
  36. package/dist/extractors/markdown.js +14 -3
  37. package/dist/extractors/relationships.d.ts.map +1 -1
  38. package/dist/extractors/relationships.js +1 -0
  39. package/dist/intent-search.d.ts.map +1 -1
  40. package/dist/intent-search.js +68 -29
  41. package/dist/operations/bootstrap/generate.d.ts.map +1 -1
  42. package/dist/operations/bootstrap/generate.js +4 -3
  43. package/dist/operations/modeling/model-requirement.d.ts +1 -1
  44. package/dist/operations/modeling/model-requirement.d.ts.map +1 -1
  45. package/dist/operations/modeling/model-requirement.js +176 -10
  46. package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -1
  47. package/dist/operations/modeling/predicate-applyplan.js +14 -2
  48. package/dist/operations/modeling/predicate-loader.d.ts.map +1 -1
  49. package/dist/operations/modeling/predicate-loader.js +24 -0
  50. package/dist/operations/modeling/predicate-types.d.ts +4 -0
  51. package/dist/operations/modeling/predicate-types.d.ts.map +1 -1
  52. package/dist/operations/modeling/predicate-vocabulary.d.ts +54 -0
  53. package/dist/operations/modeling/predicate-vocabulary.d.ts.map +1 -0
  54. package/dist/operations/modeling/predicate-vocabulary.js +169 -0
  55. package/dist/operations/modeling/requirement-types.d.ts +5 -0
  56. package/dist/operations/modeling/requirement-types.d.ts.map +1 -1
  57. package/dist/operations/modeling/vocabulary-alignment.d.ts +60 -0
  58. package/dist/operations/modeling/vocabulary-alignment.d.ts.map +1 -0
  59. package/dist/operations/modeling/vocabulary-alignment.js +178 -0
  60. package/dist/operations/mutation/contradictions.d.ts +3 -0
  61. package/dist/operations/mutation/contradictions.d.ts.map +1 -1
  62. package/dist/operations/mutation/contradictions.js +29 -0
  63. package/dist/operations/mutation/delete.d.ts.map +1 -1
  64. package/dist/operations/mutation/delete.js +33 -1
  65. package/dist/operations/mutation/predicate-vocabulary-guard.d.ts +8 -0
  66. package/dist/operations/mutation/predicate-vocabulary-guard.d.ts.map +1 -0
  67. package/dist/operations/mutation/predicate-vocabulary-guard.js +64 -0
  68. package/dist/operations/mutation/relationships.d.ts +1 -1
  69. package/dist/operations/mutation/relationships.d.ts.map +1 -1
  70. package/dist/operations/mutation/relationships.js +1 -0
  71. package/dist/operations/mutation/saga.d.ts +5 -0
  72. package/dist/operations/mutation/saga.d.ts.map +1 -1
  73. package/dist/operations/mutation/saga.js +10 -0
  74. package/dist/operations/mutation/serialization.d.ts.map +1 -1
  75. package/dist/operations/mutation/serialization.js +2 -0
  76. package/dist/operations/mutation/source-authoring.d.ts +6 -0
  77. package/dist/operations/mutation/source-authoring.d.ts.map +1 -1
  78. package/dist/operations/mutation/source-authoring.js +65 -26
  79. package/dist/operations/mutation/strict-fact.d.ts.map +1 -1
  80. package/dist/operations/mutation/strict-fact.js +5 -0
  81. package/dist/operations/mutation/types.d.ts +17 -0
  82. package/dist/operations/mutation/types.d.ts.map +1 -1
  83. package/dist/operations/mutation/upsert.d.ts +6 -0
  84. package/dist/operations/mutation/upsert.d.ts.map +1 -1
  85. package/dist/operations/mutation/upsert.js +72 -4
  86. package/dist/operations/mutation/validate-upsert.d.ts.map +1 -1
  87. package/dist/operations/mutation/validate-upsert.js +24 -1
  88. package/dist/operations/mutation/validation.d.ts.map +1 -1
  89. package/dist/operations/mutation/validation.js +16 -3
  90. package/dist/operations/planning/apply-plan.d.ts.map +1 -1
  91. package/dist/operations/planning/apply-plan.js +61 -17
  92. package/dist/operations/planning/compile-intent.d.ts.map +1 -1
  93. package/dist/operations/planning/compile-intent.js +3 -1
  94. package/dist/operations/proof/code-scope.d.ts +17 -0
  95. package/dist/operations/proof/code-scope.d.ts.map +1 -0
  96. package/dist/operations/proof/code-scope.js +60 -0
  97. package/dist/operations/proof/ingest-proof.d.ts +4 -2
  98. package/dist/operations/proof/ingest-proof.d.ts.map +1 -1
  99. package/dist/operations/proof/ingest-proof.js +207 -74
  100. package/dist/operations/proof/migrate-legacy-receipts.d.ts.map +1 -1
  101. package/dist/operations/proof/migrate-legacy-receipts.js +7 -5
  102. package/dist/operations/proof/prune-receipts.d.ts.map +1 -1
  103. package/dist/operations/proof/prune-receipts.js +7 -5
  104. package/dist/plugins/compose-semantic-classifier.d.ts +6 -1
  105. package/dist/plugins/compose-semantic-classifier.d.ts.map +1 -1
  106. package/dist/plugins/compose-semantic-classifier.js +8 -3
  107. package/dist/plugins/compose-vocabulary-alignment.d.ts +23 -0
  108. package/dist/plugins/compose-vocabulary-alignment.d.ts.map +1 -0
  109. package/dist/plugins/compose-vocabulary-alignment.js +141 -0
  110. package/dist/plugins/external-allowlist.d.ts +7 -0
  111. package/dist/plugins/external-allowlist.d.ts.map +1 -1
  112. package/dist/plugins/external-allowlist.js +13 -0
  113. package/dist/plugins/index.d.ts +2 -0
  114. package/dist/plugins/index.d.ts.map +1 -1
  115. package/dist/plugins/index.js +4 -0
  116. package/dist/plugins/registry.d.ts +2 -1
  117. package/dist/plugins/registry.d.ts.map +1 -1
  118. package/dist/plugins/registry.js +22 -1
  119. package/dist/prolog/codec.d.ts.map +1 -1
  120. package/dist/prolog/codec.js +2 -0
  121. package/dist/prolog.d.ts +36 -0
  122. package/dist/prolog.d.ts.map +1 -1
  123. package/dist/prolog.js +78 -9
  124. package/dist/public/diagnostic-usage.d.ts.map +1 -1
  125. package/dist/public/diagnostic-usage.js +7 -25
  126. package/dist/public/impact/full-kb-quality.d.ts.map +1 -1
  127. package/dist/public/impact/full-kb-quality.js +4 -12
  128. package/dist/public/operations/catalog.d.ts +36 -7
  129. package/dist/public/operations/catalog.d.ts.map +1 -1
  130. package/dist/public/operations/check-executor.d.ts.map +1 -1
  131. package/dist/public/operations/check-executor.js +10 -2
  132. package/dist/public/operations/check-helpers.d.ts +6 -0
  133. package/dist/public/operations/check-helpers.d.ts.map +1 -1
  134. package/dist/public/operations/check-helpers.js +21 -1
  135. package/dist/public/operations/contracts.d.ts.map +1 -1
  136. package/dist/public/operations/contracts.js +16 -0
  137. package/dist/public/operations/discovery-entities.d.ts +42 -2
  138. package/dist/public/operations/discovery-entities.d.ts.map +1 -1
  139. package/dist/public/operations/discovery-entities.js +195 -22
  140. package/dist/public/operations/discovery-executors.d.ts +1 -0
  141. package/dist/public/operations/discovery-executors.d.ts.map +1 -1
  142. package/dist/public/operations/discovery-executors.js +75 -46
  143. package/dist/public/operations/migration-plan.d.ts +2 -0
  144. package/dist/public/operations/migration-plan.d.ts.map +1 -1
  145. package/dist/public/operations/migration-plan.js +50 -0
  146. package/dist/public/operations/predicate-schema-conformance.d.ts +41 -0
  147. package/dist/public/operations/predicate-schema-conformance.d.ts.map +1 -0
  148. package/dist/public/operations/predicate-schema-conformance.js +242 -0
  149. package/dist/public/operations/prolog-json.d.ts.map +1 -1
  150. package/dist/public/operations/prolog-json.js +9 -3
  151. package/dist/public/operations/result-envelope.d.ts +34 -1
  152. package/dist/public/operations/result-envelope.d.ts.map +1 -1
  153. package/dist/public/operations/result-envelope.js +78 -2
  154. package/dist/public/operations/runtime-types.d.ts +1 -1
  155. package/dist/public/operations/runtime-types.d.ts.map +1 -1
  156. package/dist/public/operations/specs/check-rules.generated.d.ts +1 -1
  157. package/dist/public/operations/specs/check-rules.generated.d.ts.map +1 -1
  158. package/dist/public/operations/specs/check-rules.generated.js +8 -1
  159. package/dist/public/operations/specs/check.d.ts +1 -1
  160. package/dist/public/operations/specs/discovery.d.ts +7 -1
  161. package/dist/public/operations/specs/discovery.d.ts.map +1 -1
  162. package/dist/public/operations/specs/discovery.js +7 -1
  163. package/dist/public/operations/specs/mutation-schemas.d.ts +27 -4
  164. package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -1
  165. package/dist/public/operations/specs/mutation-schemas.js +21 -3
  166. package/dist/public/operations/specs/reporting.d.ts +8 -0
  167. package/dist/public/operations/specs/reporting.d.ts.map +1 -1
  168. package/dist/public/operations/specs/reporting.js +46 -15
  169. package/dist/public/operations/specs/upsert.d.ts +28 -5
  170. package/dist/public/operations/specs/upsert.d.ts.map +1 -1
  171. package/dist/public/operations/specs/upsert.js +1 -1
  172. package/dist/public/operations/symbol-repair-plan.d.ts.map +1 -1
  173. package/dist/public/operations/symbol-repair-plan.js +8 -3
  174. package/dist/public/schemas/entity.d.ts.map +1 -1
  175. package/dist/public/schemas/entity.js +22 -0
  176. package/dist/public/schemas/relationship.d.ts.map +1 -1
  177. package/dist/public/schemas/relationship.js +1 -0
  178. package/dist/public/skills/kibi-usage/SKILL.md +7 -3
  179. package/dist/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
  180. package/dist/public/skills/kibi-usage/resources/relationship-directions.md +35 -17
  181. package/dist/public/skills/kibi-usage/resources/source-authoring.md +36 -0
  182. package/dist/public/skills/kibi-usage/resources/workflows.md +52 -1
  183. package/dist/public/telemetry-acceptance.d.ts.map +1 -1
  184. package/dist/public/telemetry-acceptance.js +21 -5
  185. package/dist/relationships/shards.d.ts +6 -0
  186. package/dist/relationships/shards.d.ts.map +1 -1
  187. package/dist/relationships/shards.js +26 -19
  188. package/dist/schemas/entity.schema.json +32 -0
  189. package/dist/traceability/staged-diagnostics.d.ts +1 -1
  190. package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
  191. package/dist/traceability/staged-entity-id-style.d.ts +12 -0
  192. package/dist/traceability/staged-entity-id-style.d.ts.map +1 -0
  193. package/dist/traceability/staged-entity-id-style.js +68 -0
  194. package/dist/traceability/temp-kb.d.ts.map +1 -1
  195. package/dist/traceability/temp-kb.js +8 -0
  196. package/dist/traceability/validate.js +1 -1
  197. package/dist/types/entities.d.ts +2 -0
  198. package/dist/types/entities.d.ts.map +1 -1
  199. package/dist/types/relationships.d.ts +1 -1
  200. package/dist/types/relationships.d.ts.map +1 -1
  201. package/dist/utils/entity-id-style.d.ts +27 -0
  202. package/dist/utils/entity-id-style.d.ts.map +1 -0
  203. package/dist/utils/entity-id-style.js +81 -0
  204. package/dist/utils/git-repository-context.d.ts +50 -0
  205. package/dist/utils/git-repository-context.d.ts.map +1 -0
  206. package/dist/utils/git-repository-context.js +259 -0
  207. package/dist/utils/rule-registry.d.ts +5 -0
  208. package/dist/utils/rule-registry.d.ts.map +1 -1
  209. package/dist/utils/rule-registry.generated.d.ts +37 -0
  210. package/dist/utils/rule-registry.generated.d.ts.map +1 -1
  211. package/dist/utils/rule-registry.generated.js +44 -0
  212. package/dist/utils/strict-modeling.d.ts +7 -0
  213. package/dist/utils/strict-modeling.d.ts.map +1 -1
  214. package/dist/utils/strict-modeling.js +11 -0
  215. package/package.json +4 -4
  216. package/schema/entities.pl +60 -1
  217. package/schema/relationships.pl +17 -4
  218. package/schema/validation.pl +118 -20
  219. package/src/public/diagnostic-usage.ts +16 -24
  220. package/src/public/impact/full-kb-quality.ts +4 -16
  221. package/src/public/operations/check-executor.ts +12 -1
  222. package/src/public/operations/check-helpers.ts +27 -1
  223. package/src/public/operations/contracts.ts +19 -0
  224. package/src/public/operations/discovery-entities.ts +292 -23
  225. package/src/public/operations/discovery-executors.ts +91 -55
  226. package/src/public/operations/migration-plan.ts +57 -0
  227. package/src/public/operations/predicate-schema-conformance.ts +362 -0
  228. package/src/public/operations/prolog-json.ts +9 -3
  229. package/src/public/operations/result-envelope.ts +114 -2
  230. package/src/public/operations/runtime-types.ts +1 -1
  231. package/src/public/operations/specs/check-rules.generated.ts +8 -1
  232. package/src/public/operations/specs/discovery.ts +8 -1
  233. package/src/public/operations/specs/mutation-schemas.ts +23 -3
  234. package/src/public/operations/specs/reporting.ts +69 -22
  235. package/src/public/operations/specs/upsert.ts +1 -1
  236. package/src/public/operations/symbol-repair-plan.ts +13 -3
  237. package/src/public/schemas/entity.ts +22 -0
  238. package/src/public/schemas/relationship.ts +1 -0
  239. package/src/public/skills/kibi-usage/SKILL.md +7 -3
  240. package/src/public/skills/kibi-usage/resources/fact-lanes.md +4 -0
  241. package/src/public/skills/kibi-usage/resources/relationship-directions.md +35 -17
  242. package/src/public/skills/kibi-usage/resources/source-authoring.md +36 -0
  243. package/src/public/skills/kibi-usage/resources/workflows.md +52 -1
  244. package/src/public/telemetry-acceptance.ts +37 -6
  245. package/src/schemas/entity.schema.json +32 -0
  246. package/src/schemas/relationship.schema.json +1 -0
@@ -0,0 +1,242 @@
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 { BUILT_IN_PREDICATE_SCHEMAS } from "../../operations/modeling/predicate-catalog.js";
19
+ import { applyArgumentRewrites, predicateArgumentConformance, predicateCanonicalKey, predicateVocabularyErrors, predicateVocabularyFromEntity, } from "../../operations/modeling/predicate-vocabulary.js";
20
+ import entitySchema from "../schemas/entity.js";
21
+ import { loadEntitiesPaged } from "./discovery-entities.js";
22
+ const RULE = "predicate-schema-conformance";
23
+ /** Every property the public entity schema accepts. */
24
+ const AUTHORED_FIELDS = new Set(Object.keys(entitySchema.properties));
25
+ const DEFAULT_NAMESPACE = "default";
26
+ /** Fields that belong to the compiled entity, not to an authored upsert. */
27
+ const NON_AUTHORED_FIELDS = new Set([
28
+ "id",
29
+ "type",
30
+ "source",
31
+ "sourceFile",
32
+ "created_at",
33
+ "updated_at",
34
+ "links",
35
+ "relationships",
36
+ ]);
37
+ function text(value) {
38
+ return typeof value === "string" && value.trim() !== ""
39
+ ? value.trim()
40
+ : undefined;
41
+ }
42
+ function strings(value) {
43
+ return Array.isArray(value)
44
+ ? value.filter((item) => typeof item === "string")
45
+ : [];
46
+ }
47
+ function sourceField(entity) {
48
+ const source = text(entity.source);
49
+ return source !== undefined ? { source } : {};
50
+ }
51
+ function namespaceOf(entity) {
52
+ return text(entity.predicate_namespace) ?? DEFAULT_NAMESPACE;
53
+ }
54
+ function signature(namespace, name, arity) {
55
+ return `${namespace}:${name}/${arity}`;
56
+ }
57
+ function schemaRefs(facts) {
58
+ const byName = new Map();
59
+ const add = (name, ref) => {
60
+ byName.set(name, [...(byName.get(name) ?? []), ref]);
61
+ };
62
+ for (const entity of facts) {
63
+ if (entity.fact_kind !== "predicate_schema")
64
+ continue;
65
+ const name = text(entity.predicate_name);
66
+ if (name === undefined)
67
+ continue;
68
+ add(name, {
69
+ schemaId: String(entity.id),
70
+ namespace: namespaceOf(entity),
71
+ origin: "project_local",
72
+ argumentNames: strings(entity.argument_names),
73
+ entity,
74
+ });
75
+ }
76
+ // Built-in catalog schemas carry no namespace: facts that use them live in
77
+ // the default namespace. A project-local schema with the same signature wins.
78
+ for (const schema of BUILT_IN_PREDICATE_SCHEMAS) {
79
+ add(schema.predicate_name, {
80
+ schemaId: schema.id,
81
+ namespace: DEFAULT_NAMESPACE,
82
+ origin: "built_in",
83
+ argumentNames: schema.argument_names,
84
+ });
85
+ }
86
+ return byName;
87
+ }
88
+ function authoredProperties(entity) {
89
+ // Keep only fields an upsert accepts. Query rows also carry relationship
90
+ // projections (relates_to, validates, ...) as strings or lists, which must
91
+ // never be replayed as entity properties.
92
+ return Object.fromEntries(Object.entries(entity).filter(([key, value]) => AUTHORED_FIELDS.has(key) &&
93
+ !NON_AUTHORED_FIELDS.has(key) &&
94
+ value !== null &&
95
+ value !== undefined));
96
+ }
97
+ function repairFor(fact, name, args, targetNamespace, rewrites) {
98
+ const nextArgs = applyArgumentRewrites(args, rewrites);
99
+ const properties = authoredProperties(fact);
100
+ const previousKey = predicateCanonicalKey(name, args);
101
+ const nextKey = predicateCanonicalKey(name, nextArgs);
102
+ if (targetNamespace !== null)
103
+ properties.predicate_namespace = targetNamespace;
104
+ if (rewrites.length > 0) {
105
+ properties.predicate_args = nextArgs;
106
+ properties.canonical_key = nextKey;
107
+ if (properties.title === `Predicate: ${previousKey}`) {
108
+ properties.title = `Predicate: ${nextKey}`;
109
+ }
110
+ }
111
+ return { type: "fact", id: String(fact.id), properties };
112
+ }
113
+ /**
114
+ * Predicate facts must match a schema (project-local, or the built-in catalog
115
+ * in the default namespace) with the same namespace, name, and arity, and
116
+ * must use declared constants where the schema closes an argument.
117
+ */
118
+ // implements REQ-kibi-predicate-schema-conformance
119
+ export function evaluatePredicateSchemaConformance(facts) {
120
+ const schemasByName = schemaRefs(facts);
121
+ const violations = [];
122
+ for (const schema of facts) {
123
+ if (schema.fact_kind !== "predicate_schema")
124
+ continue;
125
+ const errors = predicateVocabularyErrors(schema);
126
+ if (errors.length === 0)
127
+ continue;
128
+ violations.push({
129
+ rule: RULE,
130
+ entityId: String(schema.id),
131
+ description: `Predicate schema ${String(schema.id)} declares an invalid argument vocabulary: ${errors.join("; ")}`,
132
+ suggestion: "Key argument_constants and argument_aliases by argument_names, and map every alias to a declared constant.",
133
+ ...sourceField(schema),
134
+ evidence: { schemaId: String(schema.id), errors },
135
+ });
136
+ }
137
+ for (const fact of facts) {
138
+ if (fact.fact_kind !== "predicate")
139
+ continue;
140
+ const name = text(fact.predicate_name);
141
+ const args = strings(fact.predicate_args);
142
+ if (name === undefined || args.length === 0)
143
+ continue;
144
+ const namespace = namespaceOf(fact);
145
+ const arity = args.length;
146
+ const sameShape = (schemasByName.get(name) ?? []).filter((ref) => ref.argumentNames.length === arity);
147
+ const exact = sameShape.find((ref) => ref.namespace === namespace && ref.origin === "project_local") ??
148
+ sameShape.find((ref) => ref.namespace === namespace && ref.origin === "built_in");
149
+ const candidates = [
150
+ ...new Map(sameShape
151
+ .filter((ref) => ref.namespace !== namespace)
152
+ .map((ref) => [ref.namespace, ref])).values(),
153
+ ];
154
+ const alignment = exact === undefined && candidates.length === 1
155
+ ? candidates[0]
156
+ : undefined;
157
+ const schema = exact ?? alignment;
158
+ const conformance = schema?.entity !== undefined
159
+ ? predicateArgumentConformance(schema.argumentNames, args, predicateVocabularyFromEntity(schema.entity))
160
+ : { rewrites: [], undeclared: [] };
161
+ if (exact !== undefined &&
162
+ conformance.rewrites.length === 0 &&
163
+ conformance.undeclared.length === 0) {
164
+ continue;
165
+ }
166
+ const issue = exact === undefined
167
+ ? "missing_schema"
168
+ : conformance.undeclared.length > 0
169
+ ? "undeclared_constant"
170
+ : "alias_in_use";
171
+ const mechanical = schema !== undefined && conformance.undeclared.length === 0;
172
+ const evidence = {
173
+ factId: String(fact.id),
174
+ predicateName: name,
175
+ namespace,
176
+ arity,
177
+ issue,
178
+ schemaId: exact?.schemaId ?? null,
179
+ alignment: alignment !== undefined
180
+ ? {
181
+ namespace: alignment.namespace,
182
+ schemaId: alignment.schemaId,
183
+ origin: alignment.origin,
184
+ }
185
+ : null,
186
+ candidateNamespaces: candidates.map((ref) => ref.namespace).sort(),
187
+ rewrites: conformance.rewrites,
188
+ undeclared: conformance.undeclared,
189
+ repair: mechanical
190
+ ? repairFor(fact, name, args, alignment?.namespace ?? null, conformance.rewrites)
191
+ : null,
192
+ };
193
+ violations.push({
194
+ rule: RULE,
195
+ entityId: String(fact.id),
196
+ description: conformanceDescription(evidence),
197
+ suggestion: conformanceSuggestion(evidence),
198
+ ...sourceField(fact),
199
+ evidence,
200
+ });
201
+ }
202
+ return violations;
203
+ }
204
+ function conformanceDescription(evidence) {
205
+ const where = signature(evidence.namespace, evidence.predicateName, evidence.arity);
206
+ const parts = [];
207
+ if (evidence.issue === "missing_schema") {
208
+ parts.push(evidence.alignment !== null
209
+ ? `Predicate fact ${evidence.factId} uses ${where}, but its schema ${evidence.alignment.schemaId} is in namespace ${evidence.alignment.namespace}`
210
+ : evidence.candidateNamespaces.length > 1
211
+ ? `Predicate fact ${evidence.factId} uses ${where}; schemas with this signature exist in several namespaces (${evidence.candidateNamespaces.join(", ")})`
212
+ : `Predicate fact ${evidence.factId} uses ${where}, which has no predicate_schema`);
213
+ }
214
+ else {
215
+ parts.push(`Predicate fact ${evidence.factId} (${where})`);
216
+ }
217
+ for (const rewrite of evidence.rewrites) {
218
+ parts.push(`argument ${rewrite.argumentName} uses alias ${rewrite.from} for ${rewrite.to}`);
219
+ }
220
+ for (const value of evidence.undeclared) {
221
+ parts.push(`argument ${value.argumentName} value ${value.value} is not a declared constant (${value.allowed.join(", ")})`);
222
+ }
223
+ return parts.join("; ");
224
+ }
225
+ function conformanceSuggestion(evidence) {
226
+ if (evidence.repair !== null) {
227
+ return "Mechanical repair available: review and apply it with kibi migrate --apply-safe (or replay the kb_upsert in the migration action).";
228
+ }
229
+ if (evidence.undeclared.length > 0) {
230
+ return "Use a declared constant, add the value to argument_constants, or map it with argument_aliases so kibi migrate can rewrite it.";
231
+ }
232
+ if (evidence.candidateNamespaces.length > 1) {
233
+ return "Set predicate_namespace to the schema this claim belongs to.";
234
+ }
235
+ return "Declare a predicate_schema for this signature (kb_suggest_predicates helps pick an existing one) or move the claim to a schema that already exists.";
236
+ }
237
+ /** Load every fact once and evaluate predicate conformance. */
238
+ // implements REQ-kibi-predicate-schema-conformance
239
+ export async function collectPredicateSchemaConformanceViolations(prolog) {
240
+ const facts = await loadEntitiesPaged(prolog, "fact");
241
+ return evaluatePredicateSchemaConformance(facts);
242
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"prolog-json.d.ts","sourceRoot":"","sources":["../../../src/public/operations/prolog-json.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEvD;;;;;GAKG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,gCAAgC;IAC7C,QAAQ,CAAC,KAAK,EAAE,sBAAsB,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;gBAG3C,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,OAAO;CAiBjB;AAUD,wBAAsB,qBAAqB,CAAC,CAAC,EAC3C,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,CAAC,CAAC,CA2DZ;AAkBD,wBAAgB,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAInD;AAED,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAI/D"}
1
+ {"version":3,"file":"prolog-json.d.ts","sourceRoot":"","sources":["../../../src/public/operations/prolog-json.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEvD;;;;;GAKG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;IACjD,QAAQ,CAAC,IAAI,gCAAgC;IAC7C,QAAQ,CAAC,KAAK,EAAE,sBAAsB,CAAC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;gBAG3C,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,OAAO;CAiBjB;AAUD,wBAAsB,qBAAqB,CAAC,CAAC,EAC3C,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,CAAC,CAAC,CAiEZ;AAkBD,wBAAgB,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAInD;AAED,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAI/D"}
@@ -34,10 +34,16 @@ export async function runOperationJsonQuery(prolog, fileName, goal, errorLabel,
34
34
  const modulePath = escapeAtom(resolveCoreModulePath(fileName).replaceAll("\\", "/"));
35
35
  // Loading a module and invoking its predicate in one interactive goal makes
36
36
  // SWI reject `use_module/1` under the engine's guarded `once/1` wrapper, so
37
- // use two serialized requests for production and retain the combined goal
38
- // only for the repository's Bun-based one-shot tests.
37
+ // an interactive port gets two serialized requests. That split is only
38
+ // sound when both requests reach the same live session: the engine daemon
39
+ // guarantees it by recycling a lost session with every loaded module
40
+ // restored, and a started PrologProcess fails loudly once its session is
41
+ // lost. Any port whose queries run in isolated processes (an unstarted or
42
+ // one-shot PrologProcess reports `oneShotMode`) must receive the combined
43
+ // goal, or the module load and the predicate call land in different SWI
44
+ // processes and the call fails with an existence error.
39
45
  const longLivedEngine = typeof prolog.storageStatus === "function";
40
- const oneShotMode = prolog.oneShotMode === true ||
46
+ const oneShotMode = prolog.oneShotMode ??
41
47
  (!longLivedEngine &&
42
48
  process.env.NODE_ENV === "test" &&
43
49
  typeof globalThis.Bun !== "undefined");
@@ -9,6 +9,39 @@ export declare function toKibiResult<T>(spec: {
9
9
  readonly name: OperationName | string;
10
10
  readonly effects: readonly OperationEffect[];
11
11
  readonly resultVersion?: string;
12
- }, data: T, options?: Partial<Pick<KibiResult<T>, "status" | "diagnostics" | "nextActions" | "error">>): KibiResult<T>;
12
+ }, data: T, options?: Partial<Pick<KibiResult<T>, "status" | "diagnostics" | "nextActions" | "error">> & {
13
+ /**
14
+ * False when the operation was rejected before it ran (invalid input),
15
+ * so an error envelope reports its effects as not applicable rather than
16
+ * failed.
17
+ */
18
+ readonly attempted?: boolean;
19
+ }): KibiResult<T>;
13
20
  export declare function operationData(value: unknown): unknown;
21
+ export interface NormalizedResultPayload {
22
+ /** The versioned KibiResult envelope, when the result carries one. */
23
+ readonly envelope?: Record<string, unknown>;
24
+ /** The operation payload that operation-specific telemetry fields read. */
25
+ readonly data?: Record<string, unknown>;
26
+ }
27
+ /**
28
+ * Resolve a tool result into its envelope and its operation payload.
29
+ *
30
+ * Callers hand results over in two shapes: MCP tool handlers pass the bare
31
+ * `toKibiResult` envelope, while some CLI and SDK routes wrap it as
32
+ * `{ structuredContent }`. Deriving telemetry from the wrong shape silently
33
+ * yields an absent payload, so both shapes resolve here instead of at each
34
+ * call site. An unresolvable payload stays `undefined` so callers can record
35
+ * the count as unknown rather than as zero.
36
+ */
37
+ export declare function normalizeResultPayload(result: unknown): NormalizedResultPayload;
38
+ /**
39
+ * Record a count that could not be read as unknown rather than as zero.
40
+ *
41
+ * A missing payload and an empty result are different facts, and collapsing
42
+ * them hides retrieval failures behind a plausible "0 results" row. Both the
43
+ * MCP and CLI diagnostic loggers derive counts here so the two surfaces stay
44
+ * at parity.
45
+ */
46
+ export declare function appendPayloadCountField(fields: Record<string, unknown>, countKey: string, noun: string, payload: Record<string, unknown> | undefined): void;
14
47
  //# sourceMappingURL=result-envelope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"result-envelope.d.ts","sourceRoot":"","sources":["../../../src/public/operations/result-envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE7E,eAAO,MAAM,qBAAqB,EAAG,CAAU,CAAC;AAoChD,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAS/B;AA6CD,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAClC,QAAQ,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAAC;IACtC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC,GAAG,MAAM,CAET;AAED,wBAAgB,YAAY,CAAC,CAAC,EAC5B,IAAI,EAAE;IACJ,QAAQ,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAAC;IACtC,QA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,OAAO,CAAC,CACxE,GAAG;IACF;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CACzB,GACL,UAAU,CAAC,CAAC,CAAC,CAsBf;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAKrD;AAGD,MAAM,WAAW,uBAAuB;IACtC,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,OAAO,GACd,uBAAuB,CAYzB;AAaD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAC3C,IAAI,CAKN"}
@@ -41,13 +41,39 @@ export function failedEffectStatus(effect, failure) {
41
41
  : {}),
42
42
  };
43
43
  }
44
- function effectStatus(effect, data) {
44
+ function effectOutcome(status, options) {
45
+ if (status !== "error")
46
+ return { kind: "completed" };
47
+ if (options.attempted === false)
48
+ return { kind: "not_attempted" };
49
+ return options.error
50
+ ? { kind: "failed", errorCode: options.error.code }
51
+ : { kind: "failed" };
52
+ }
53
+ function effectStatus(effect, data, outcome) {
45
54
  const failures = data?.effectFailures;
46
55
  if (Array.isArray(failures)) {
47
56
  const failure = failures.find((entry) => record(entry) && entry.kind === effect);
48
57
  if (record(failure))
49
58
  return failedEffectStatus(effect, failure);
50
59
  }
60
+ // A plan-only result declares the effects it left to a later call.
61
+ if (Array.isArray(data?.skippedEffects) &&
62
+ data.skippedEffects.includes(effect)) {
63
+ return { kind: effect, status: "not_applicable" };
64
+ }
65
+ // An error envelope must never claim a declared effect completed: the
66
+ // operation either never ran or stopped before reporting its effects.
67
+ if (outcome.kind === "not_attempted") {
68
+ return { kind: effect, status: "not_applicable" };
69
+ }
70
+ if (outcome.kind === "failed") {
71
+ return {
72
+ kind: effect,
73
+ status: "failed",
74
+ ...(outcome.errorCode ? { errorCode: outcome.errorCode } : {}),
75
+ };
76
+ }
51
77
  return { kind: effect, status: "completed" };
52
78
  }
53
79
  function extraFailedEffects(declared, data) {
@@ -83,6 +109,7 @@ export function toKibiResult(spec, data, options = {}) {
83
109
  (row?.status === "committed_with_repairs"
84
110
  ? "committed_with_repairs"
85
111
  : "success");
112
+ const outcome = effectOutcome(status, options);
86
113
  return {
87
114
  kibiProtocol: KIBI_PROTOCOL_VERSION,
88
115
  operation: spec.name,
@@ -90,7 +117,7 @@ export function toKibiResult(spec, data, options = {}) {
90
117
  status,
91
118
  data,
92
119
  effects: [
93
- ...spec.effects.map((effect) => effectStatus(effect, row)),
120
+ ...spec.effects.map((effect) => effectStatus(effect, row, outcome)),
94
121
  ...extraFailedEffects(spec.effects, row),
95
122
  ],
96
123
  diagnostics: options.diagnostics ?? diagnostics(row?.diagnostics),
@@ -104,3 +131,52 @@ export function operationData(value) {
104
131
  }
105
132
  return value;
106
133
  }
134
+ /**
135
+ * Resolve a tool result into its envelope and its operation payload.
136
+ *
137
+ * Callers hand results over in two shapes: MCP tool handlers pass the bare
138
+ * `toKibiResult` envelope, while some CLI and SDK routes wrap it as
139
+ * `{ structuredContent }`. Deriving telemetry from the wrong shape silently
140
+ * yields an absent payload, so both shapes resolve here instead of at each
141
+ * call site. An unresolvable payload stays `undefined` so callers can record
142
+ * the count as unknown rather than as zero.
143
+ */
144
+ export function normalizeResultPayload(result) {
145
+ if (!record(result))
146
+ return {};
147
+ const candidate = record(result.structuredContent)
148
+ ? result.structuredContent
149
+ : result;
150
+ if (candidate.kibiProtocol !== KIBI_PROTOCOL_VERSION) {
151
+ return { data: candidate };
152
+ }
153
+ return {
154
+ envelope: candidate,
155
+ ...(record(candidate.data) ? { data: candidate.data } : {}),
156
+ };
157
+ }
158
+ function readPayloadCount(raw) {
159
+ if (typeof raw === "number")
160
+ return Number.isFinite(raw) ? raw : null;
161
+ // Some transports serialize counts as strings; an absent or unparseable
162
+ // value stays null so it is never coerced to a plausible zero.
163
+ if (typeof raw === "string" && raw.trim() !== "") {
164
+ const parsed = Number(raw);
165
+ return Number.isFinite(parsed) ? parsed : null;
166
+ }
167
+ return null;
168
+ }
169
+ /**
170
+ * Record a count that could not be read as unknown rather than as zero.
171
+ *
172
+ * A missing payload and an empty result are different facts, and collapsing
173
+ * them hides retrieval failures behind a plausible "0 results" row. Both the
174
+ * MCP and CLI diagnostic loggers derive counts here so the two surfaces stay
175
+ * at parity.
176
+ */
177
+ export function appendPayloadCountField(fields, countKey, noun, payload) {
178
+ const count = readPayloadCount(payload?.count);
179
+ fields[countKey] = count;
180
+ fields.result_summary =
181
+ count === null ? `${noun} count unavailable` : `${count} ${noun}`;
182
+ }
@@ -180,7 +180,7 @@ export type OperationContext = {
180
180
  readonly sourceFirst?: boolean;
181
181
  /** Internal apply-plan capability: source bytes were already approved/published. */
182
182
  readonly sourcePlanApplication?: boolean;
183
- /** Internal apply-plan capability: caller holds the cooperative source lock. */
183
+ /** Internal operation capability: a parent operation holds the source lock. */
184
184
  readonly sourceMutationLockHeld?: boolean;
185
185
  readonly git?: GitPort;
186
186
  readonly net?: NetworkPort;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-types.d.ts","sourceRoot":"","sources":["../../../src/public/operations/runtime-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,E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B,YAAY,CACV,IAAI,EAAE,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,EAC5C,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,KAAK,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5E;AAGD,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,OAAO,EACpD,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3C,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,OAAO,CAAC,CAclB"}
@@ -1,5 +1,5 @@
1
1
  /** Every selectable kb_check rule name, registry order. */
2
2
  export declare const SELECTABLE_RULE_NAMES: readonly string[];
3
3
  /** Comma-separated "Allowed:" fragment for the kb_check rules description. */
4
- export declare const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols";
4
+ export declare const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, predicate-schema-conformance";
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,EAqBlD,CAAC;AAGF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,gaAC0X,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,EA4BlD,CAAC;AAGF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,ijBAC2gB,CAAC"}
@@ -29,7 +29,14 @@ export const SELECTABLE_RULE_NAMES = [
29
29
  "strict-readiness",
30
30
  "semantic-completeness",
31
31
  "proof-contract-symbols",
32
+ "entity-id-style",
33
+ "domain-redundancy",
34
+ "domain-implication",
35
+ "subject-key-identity",
36
+ "subject-key-shape",
37
+ "ontology-quality",
38
+ "predicate-schema-conformance",
32
39
  ];
33
40
  // implements REQ-006
34
41
  /** Comma-separated "Allowed:" fragment for the kb_check rules description. */
35
- export const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols";
42
+ export const SELECTABLE_RULES_ALLOWED = "must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, predicate-schema-conformance";
@@ -12,7 +12,7 @@ export declare const checkSpec: {
12
12
  readonly type: "string";
13
13
  readonly enum: readonly string[];
14
14
  };
15
- readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
15
+ readonly description: "Optional rule subset. Allowed: must-priority-coverage, symbol-coverage, symbol-traceability, no-dangling-refs, source-relationship-parity, no-cycles, required-fields, deprecated-adr-no-successor, domain-contradictions, logic-coverage, rule-safety, rule-verifiability, query-plan-safety, req-status-vocabulary, strict-fact-shape, strict-req-fact-pairing, predicate-verifiability, strict-readiness, semantic-completeness, proof-contract-symbols, entity-id-style, domain-redundancy, domain-implication, subject-key-identity, subject-key-shape, ontology-quality, predicate-schema-conformance. If omitted, server runs canonical and advisory rules plus the full-KB qualityDiagnostics audit scan, including usage telemetry acceptance when evidence exists; migration rules run only when explicitly selected. Advisory and migration findings are non-blocking qualityDiagnostics. If supplied, server preserves scoped validation and skips the full-KB advisory scan.";
16
16
  };
17
17
  readonly sourceFiles: {
18
18
  readonly type: "array";
@@ -13,7 +13,7 @@ export declare const querySpec: {
13
13
  };
14
14
  readonly id: {
15
15
  readonly type: "string";
16
- readonly description: "Optional exact entity ID. Example: 'REQ-001'. If omitted, returns matching entities by other filters.";
16
+ readonly description: "Optional exact entity ID. Example: 'REQ-cli-gc'. If omitted, returns matching entities by other filters.";
17
17
  };
18
18
  readonly tags: {
19
19
  readonly type: "array";
@@ -158,6 +158,12 @@ export declare const searchSpec: {
158
158
  readonly default: 0.18;
159
159
  readonly description: "Intent-v1 acceptance threshold between 0 and 1. Low-confidence queries abstain instead of returning misleading matches.";
160
160
  };
161
+ readonly fields: {
162
+ readonly type: "string";
163
+ readonly enum: readonly ["summary", "full"];
164
+ readonly default: "summary";
165
+ readonly description: "Optional result detail. 'summary' returns identifying metadata plus the match snippet for discovery. Use 'full' to include complete entity bodies, or follow up with kb_query for the exact entities you need.";
166
+ };
161
167
  };
162
168
  };
163
169
  readonly requiresProlog: true;
@@ -1 +1 @@
1
- {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,2BAA2B,CAAC;AAsBnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDsC,CAAC;AAE7D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6FuC,CAAC;AAE/D,eAAO,MAAM,UAAU;;;;;;;;;;;;CAWuC,CAAC"}
1
+ {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../../../src/public/operations/specs/discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,2BAA2B,CAAC;AAsBnC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDsC,CAAC;AAE7D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGuC,CAAC;AAE/D,eAAO,MAAM,UAAU;;;;;;;;;;;;CAWuC,CAAC"}
@@ -23,7 +23,7 @@ export const querySpec = {
23
23
  },
24
24
  id: {
25
25
  type: "string",
26
- description: "Optional exact entity ID. Example: 'REQ-001'. If omitted, returns matching entities by other filters.",
26
+ description: "Optional exact entity ID. Example: 'REQ-cli-gc'. If omitted, returns matching entities by other filters.",
27
27
  },
28
28
  tags: {
29
29
  type: "array",
@@ -131,6 +131,12 @@ export const searchSpec = {
131
131
  default: 0.18,
132
132
  description: "Intent-v1 acceptance threshold between 0 and 1. Low-confidence queries abstain instead of returning misleading matches.",
133
133
  },
134
+ fields: {
135
+ type: "string",
136
+ enum: ["summary", "full"],
137
+ default: "summary",
138
+ description: "Optional result detail. 'summary' returns identifying metadata plus the match snippet for discovery. Use 'full' to include complete entity bodies, or follow up with kb_query for the exact entities you need.",
139
+ },
134
140
  },
135
141
  },
136
142
  requiresProlog: true,
@@ -13,7 +13,7 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
13
13
  };
14
14
  readonly source: {
15
15
  readonly type: "string";
16
- readonly description: "Optional provenance string. Example: 'docs/requirements/REQ-123.md'. Defaults to 'mcp://kibi/upsert'.";
16
+ readonly description: "Optional provenance string. Example: '.kb/requirements/REQ-cli-gc.md'. Defaults to 'mcp://kibi/upsert'.";
17
17
  };
18
18
  readonly tags: {
19
19
  readonly type: "array";
@@ -39,7 +39,7 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
39
39
  readonly items: {
40
40
  readonly type: "string";
41
41
  };
42
- readonly description: "Optional references. Example: ['REQ-010','https://example.com/spec'].";
42
+ readonly description: "Optional references. Example: ['REQ-cli-gc','https://example.com/spec'].";
43
43
  };
44
44
  readonly text_ref: {
45
45
  readonly type: "string";
@@ -514,6 +514,29 @@ export declare const ENTITY_PROPERTIES_SCHEMA: {
514
514
  };
515
515
  readonly description: "Optional ordered argument explanations.";
516
516
  };
517
+ readonly argument_constants: {
518
+ readonly type: "object";
519
+ readonly additionalProperties: {
520
+ readonly type: "array";
521
+ readonly items: {
522
+ readonly type: "string";
523
+ readonly minLength: 1;
524
+ };
525
+ readonly minItems: 1;
526
+ };
527
+ readonly description: "predicate_schema only: allowed constants keyed by argument name, e.g. {\"severity\": [\"warning\", \"info\"]}. Predicate facts must use a listed constant for those arguments; unlisted arguments stay open.";
528
+ };
529
+ readonly argument_aliases: {
530
+ readonly type: "object";
531
+ readonly additionalProperties: {
532
+ readonly type: "object";
533
+ readonly additionalProperties: {
534
+ readonly type: "string";
535
+ readonly minLength: 1;
536
+ };
537
+ };
538
+ readonly description: "predicate_schema only: legacy spellings keyed by argument name, each mapped to a declared constant, e.g. {\"severity\": {\"warn\": \"warning\"}}. kibi migrate rewrites facts that still use an alias.";
539
+ };
517
540
  readonly aliases: {
518
541
  readonly type: "array";
519
542
  readonly items: {
@@ -583,7 +606,7 @@ export declare const RELATIONSHIPS_SCHEMA: {
583
606
  readonly properties: {
584
607
  readonly type: {
585
608
  readonly type: "string";
586
- readonly enum: readonly ["depends_on", "specified_by", "verified_by", "validates", "implements", "covered_by", "executable_for", "constrained_by", "constrains", "requires_property", "requires_predicate", "requires_rule", "guards", "publishes", "consumes", "supersedes", "relates_to"];
609
+ readonly enum: readonly ["depends_on", "specified_by", "verified_by", "validates", "implements", "covered_by", "executable_for", "constrained_by", "constrains", "requires_property", "requires_predicate", "requires_rule", "guards", "publishes", "consumes", "supersedes", "restates", "relates_to"];
587
610
  readonly description: "Relationship type enum. Use only supported values. Direction semantics follow KB model (e.g., implements symbol->req, verified_by req/scenario->test, executable_for symbol->test).";
588
611
  };
589
612
  readonly from: {
@@ -592,7 +615,7 @@ export declare const RELATIONSHIPS_SCHEMA: {
592
615
  };
593
616
  readonly to: {
594
617
  readonly type: "string";
595
- readonly description: "Target entity ID (must exist). Example: 'REQ-001'.";
618
+ readonly description: "Target entity ID (must exist). Example: 'REQ-cli-gc'.";
596
619
  };
597
620
  };
598
621
  };