kibi-cli 0.12.8 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (501) hide show
  1. package/bin/kibi +3 -1
  2. package/dist/cli-command.d.ts +5 -0
  3. package/dist/cli-command.d.ts.map +1 -0
  4. package/dist/cli-command.js +9 -0
  5. package/dist/cli-errors.d.ts +13 -0
  6. package/dist/cli-errors.d.ts.map +1 -0
  7. package/dist/cli-errors.js +26 -0
  8. package/dist/cli-input.d.ts +6 -0
  9. package/dist/cli-input.d.ts.map +1 -0
  10. package/dist/cli-input.js +54 -0
  11. package/dist/cli-json-command.d.ts +14 -0
  12. package/dist/cli-json-command.d.ts.map +1 -0
  13. package/dist/cli-json-command.js +96 -0
  14. package/dist/cli-protocol.d.ts +12 -0
  15. package/dist/cli-protocol.d.ts.map +1 -0
  16. package/dist/cli-protocol.js +37 -0
  17. package/dist/cli-register-foundation.d.ts +3 -0
  18. package/dist/cli-register-foundation.d.ts.map +1 -0
  19. package/dist/cli-register-foundation.js +90 -0
  20. package/dist/cli-register-maintenance.d.ts +3 -0
  21. package/dist/cli-register-maintenance.d.ts.map +1 -0
  22. package/dist/cli-register-maintenance.js +36 -0
  23. package/dist/cli-register-reporting.d.ts +3 -0
  24. package/dist/cli-register-reporting.d.ts.map +1 -0
  25. package/dist/cli-register-reporting.js +101 -0
  26. package/dist/cli-register-skills.d.ts +3 -0
  27. package/dist/cli-register-skills.d.ts.map +1 -0
  28. package/dist/cli-register-skills.js +71 -0
  29. package/dist/cli-validate.d.ts +18 -0
  30. package/dist/cli-validate.d.ts.map +1 -0
  31. package/dist/cli-validate.js +45 -0
  32. package/dist/cli.d.ts +4 -4
  33. package/dist/cli.d.ts.map +1 -1
  34. package/dist/cli.js +48 -210
  35. package/dist/commands/aggregated-checks.d.ts +1 -1
  36. package/dist/commands/aggregated-checks.d.ts.map +1 -1
  37. package/dist/commands/aggregated-checks.js +28 -34
  38. package/dist/commands/check.d.ts +2 -1
  39. package/dist/commands/check.d.ts.map +1 -1
  40. package/dist/commands/check.js +145 -152
  41. package/dist/commands/coverage.d.ts.map +1 -1
  42. package/dist/commands/coverage.js +12 -17
  43. package/dist/commands/discovery-shared.d.ts +3 -1
  44. package/dist/commands/discovery-shared.d.ts.map +1 -1
  45. package/dist/commands/discovery-shared.js +8 -209
  46. package/dist/commands/discovery-table.d.ts +3 -0
  47. package/dist/commands/discovery-table.d.ts.map +1 -0
  48. package/dist/commands/discovery-table.js +204 -0
  49. package/dist/commands/gaps.d.ts.map +1 -1
  50. package/dist/commands/gaps.js +15 -19
  51. package/dist/commands/graph.d.ts.map +1 -1
  52. package/dist/commands/graph.js +15 -21
  53. package/dist/commands/query.d.ts +7 -7
  54. package/dist/commands/query.d.ts.map +1 -1
  55. package/dist/commands/query.js +98 -204
  56. package/dist/commands/search.d.ts +4 -4
  57. package/dist/commands/search.d.ts.map +1 -1
  58. package/dist/commands/search.js +14 -27
  59. package/dist/commands/status.d.ts +1 -1
  60. package/dist/commands/status.d.ts.map +1 -1
  61. package/dist/commands/status.js +6 -7
  62. package/dist/commands/sync/discovery.d.ts.map +1 -1
  63. package/dist/commands/sync/discovery.js +8 -1
  64. package/dist/commands/sync/extraction.d.ts +6 -1
  65. package/dist/commands/sync/extraction.d.ts.map +1 -1
  66. package/dist/commands/sync/extraction.js +7 -3
  67. package/dist/commands/sync/manifest.d.ts +1 -1
  68. package/dist/commands/sync/manifest.d.ts.map +1 -1
  69. package/dist/commands/sync/manifest.js +9 -17
  70. package/dist/commands/sync/persistence.d.ts.map +1 -1
  71. package/dist/commands/sync/persistence.js +51 -2
  72. package/dist/extractors/manifest.d.ts.map +1 -1
  73. package/dist/extractors/manifest.js +18 -0
  74. package/dist/extractors/markdown.d.ts +20 -2
  75. package/dist/extractors/markdown.d.ts.map +1 -1
  76. package/dist/extractors/markdown.js +38 -1
  77. package/dist/extractors/symbols-coordinator.d.ts +1 -1
  78. package/dist/extractors/symbols-coordinator.d.ts.map +1 -1
  79. package/dist/extractors/symbols-ts.d.ts.map +1 -1
  80. package/dist/extractors/symbols-ts.js +73 -1
  81. package/dist/operations/autopilot/activation.d.ts +4 -0
  82. package/dist/operations/autopilot/activation.d.ts.map +1 -0
  83. package/dist/operations/autopilot/activation.js +130 -0
  84. package/dist/operations/autopilot/candidate-helpers.d.ts +13 -0
  85. package/dist/operations/autopilot/candidate-helpers.d.ts.map +1 -0
  86. package/dist/operations/autopilot/candidate-helpers.js +55 -0
  87. package/dist/operations/autopilot/candidates.d.ts +4 -0
  88. package/dist/operations/autopilot/candidates.d.ts.map +1 -0
  89. package/dist/operations/autopilot/candidates.js +114 -0
  90. package/dist/operations/autopilot/discovery-evidence.d.ts +10 -0
  91. package/dist/operations/autopilot/discovery-evidence.d.ts.map +1 -0
  92. package/dist/operations/autopilot/discovery-evidence.js +158 -0
  93. package/dist/operations/autopilot/discovery.d.ts +4 -0
  94. package/dist/operations/autopilot/discovery.d.ts.map +1 -0
  95. package/dist/operations/autopilot/discovery.js +100 -0
  96. package/dist/operations/autopilot/generate.d.ts +8 -0
  97. package/dist/operations/autopilot/generate.d.ts.map +1 -0
  98. package/dist/operations/autopilot/generate.js +112 -0
  99. package/dist/operations/autopilot/guidance-actions.d.ts +3 -0
  100. package/dist/operations/autopilot/guidance-actions.d.ts.map +1 -0
  101. package/dist/operations/autopilot/guidance-actions.js +79 -0
  102. package/dist/operations/autopilot/guidance.d.ts +14 -0
  103. package/dist/operations/autopilot/guidance.d.ts.map +1 -0
  104. package/dist/operations/autopilot/guidance.js +124 -0
  105. package/dist/operations/autopilot/markdown-candidates.d.ts +7 -0
  106. package/dist/operations/autopilot/markdown-candidates.d.ts.map +1 -0
  107. package/dist/operations/autopilot/markdown-candidates.js +134 -0
  108. package/dist/operations/autopilot/presentation.d.ts +13 -0
  109. package/dist/operations/autopilot/presentation.d.ts.map +1 -0
  110. package/dist/operations/autopilot/presentation.js +91 -0
  111. package/dist/operations/autopilot/requirement-claims.d.ts +3 -0
  112. package/dist/operations/autopilot/requirement-claims.d.ts.map +1 -0
  113. package/dist/operations/autopilot/requirement-claims.js +48 -0
  114. package/dist/operations/autopilot/types.d.ts +117 -0
  115. package/dist/operations/autopilot/types.d.ts.map +1 -0
  116. package/dist/operations/autopilot/types.js +8 -0
  117. package/dist/operations/modeling/model-requirement.d.ts +10 -0
  118. package/dist/operations/modeling/model-requirement.d.ts.map +1 -0
  119. package/dist/operations/modeling/model-requirement.js +108 -0
  120. package/dist/operations/modeling/predicate-applyplan.d.ts +6 -0
  121. package/dist/operations/modeling/predicate-applyplan.d.ts.map +1 -0
  122. package/dist/operations/modeling/predicate-applyplan.js +104 -0
  123. package/dist/operations/modeling/predicate-catalog-1.d.ts +3 -0
  124. package/dist/operations/modeling/predicate-catalog-1.d.ts.map +1 -0
  125. package/dist/operations/modeling/predicate-catalog-1.js +200 -0
  126. package/dist/operations/modeling/predicate-catalog-2.d.ts +3 -0
  127. package/dist/operations/modeling/predicate-catalog-2.d.ts.map +1 -0
  128. package/dist/operations/modeling/predicate-catalog-2.js +197 -0
  129. package/dist/operations/modeling/predicate-catalog-3.d.ts +3 -0
  130. package/dist/operations/modeling/predicate-catalog-3.d.ts.map +1 -0
  131. package/dist/operations/modeling/predicate-catalog-3.js +193 -0
  132. package/dist/operations/modeling/predicate-catalog-4.d.ts +3 -0
  133. package/dist/operations/modeling/predicate-catalog-4.d.ts.map +1 -0
  134. package/dist/operations/modeling/predicate-catalog-4.js +149 -0
  135. package/dist/operations/modeling/predicate-catalog.d.ts +5 -0
  136. package/dist/operations/modeling/predicate-catalog.d.ts.map +1 -0
  137. package/dist/operations/modeling/predicate-catalog.js +29 -0
  138. package/dist/operations/modeling/predicate-inference-1.d.ts +16 -0
  139. package/dist/operations/modeling/predicate-inference-1.d.ts.map +1 -0
  140. package/dist/operations/modeling/predicate-inference-1.js +161 -0
  141. package/dist/operations/modeling/predicate-inference-2.d.ts +19 -0
  142. package/dist/operations/modeling/predicate-inference-2.d.ts.map +1 -0
  143. package/dist/operations/modeling/predicate-inference-2.js +169 -0
  144. package/dist/operations/modeling/predicate-inference-3.d.ts +15 -0
  145. package/dist/operations/modeling/predicate-inference-3.d.ts.map +1 -0
  146. package/dist/operations/modeling/predicate-inference-3.js +163 -0
  147. package/dist/operations/modeling/predicate-inference.d.ts +5 -0
  148. package/dist/operations/modeling/predicate-inference.d.ts.map +1 -0
  149. package/dist/operations/modeling/predicate-inference.js +148 -0
  150. package/dist/operations/modeling/predicate-loader.d.ts +10 -0
  151. package/dist/operations/modeling/predicate-loader.d.ts.map +1 -0
  152. package/dist/operations/modeling/predicate-loader.js +88 -0
  153. package/dist/operations/modeling/predicate-ranker.d.ts +3 -0
  154. package/dist/operations/modeling/predicate-ranker.d.ts.map +1 -0
  155. package/dist/operations/modeling/predicate-ranker.js +24 -0
  156. package/dist/operations/modeling/predicate-score-1.d.ts +3 -0
  157. package/dist/operations/modeling/predicate-score-1.d.ts.map +1 -0
  158. package/dist/operations/modeling/predicate-score-1.js +121 -0
  159. package/dist/operations/modeling/predicate-score-2.d.ts +3 -0
  160. package/dist/operations/modeling/predicate-score-2.d.ts.map +1 -0
  161. package/dist/operations/modeling/predicate-score-2.js +122 -0
  162. package/dist/operations/modeling/predicate-score-3.d.ts +3 -0
  163. package/dist/operations/modeling/predicate-score-3.d.ts.map +1 -0
  164. package/dist/operations/modeling/predicate-score-3.js +54 -0
  165. package/dist/operations/modeling/predicate-types.d.ts +61 -0
  166. package/dist/operations/modeling/predicate-types.d.ts.map +1 -0
  167. package/dist/operations/modeling/predicate-types.js +1 -0
  168. package/dist/operations/modeling/predicate-usage-hints-1.d.ts +3 -0
  169. package/dist/operations/modeling/predicate-usage-hints-1.d.ts.map +1 -0
  170. package/dist/operations/modeling/predicate-usage-hints-1.js +211 -0
  171. package/dist/operations/modeling/predicate-usage-hints-2.d.ts +3 -0
  172. package/dist/operations/modeling/predicate-usage-hints-2.d.ts.map +1 -0
  173. package/dist/operations/modeling/predicate-usage-hints-2.js +209 -0
  174. package/dist/operations/modeling/predicate-usage-hints-3.d.ts +3 -0
  175. package/dist/operations/modeling/predicate-usage-hints-3.d.ts.map +1 -0
  176. package/dist/operations/modeling/predicate-usage-hints-3.js +45 -0
  177. package/dist/operations/modeling/predicate-utils.d.ts +23 -0
  178. package/dist/operations/modeling/predicate-utils.d.ts.map +1 -0
  179. package/dist/operations/modeling/predicate-utils.js +187 -0
  180. package/dist/operations/modeling/requirement-applyplan.d.ts +4 -0
  181. package/dist/operations/modeling/requirement-applyplan.d.ts.map +1 -0
  182. package/dist/operations/modeling/requirement-applyplan.js +44 -0
  183. package/dist/operations/modeling/requirement-heuristics.d.ts +4 -0
  184. package/dist/operations/modeling/requirement-heuristics.d.ts.map +1 -0
  185. package/dist/operations/modeling/requirement-heuristics.js +114 -0
  186. package/dist/operations/modeling/requirement-modeler.d.ts +8 -0
  187. package/dist/operations/modeling/requirement-modeler.d.ts.map +1 -0
  188. package/dist/operations/modeling/requirement-modeler.js +70 -0
  189. package/dist/operations/modeling/requirement-types.d.ts +49 -0
  190. package/dist/operations/modeling/requirement-types.d.ts.map +1 -0
  191. package/dist/operations/modeling/requirement-types.js +1 -0
  192. package/dist/operations/modeling/requirement-utils.d.ts +10 -0
  193. package/dist/operations/modeling/requirement-utils.d.ts.map +1 -0
  194. package/dist/operations/modeling/requirement-utils.js +65 -0
  195. package/dist/operations/modeling/suggest-predicates.d.ts +6 -0
  196. package/dist/operations/modeling/suggest-predicates.d.ts.map +1 -0
  197. package/dist/operations/modeling/suggest-predicates.js +64 -0
  198. package/dist/operations/mutation/audit.d.ts +6 -0
  199. package/dist/operations/mutation/audit.d.ts.map +1 -0
  200. package/dist/operations/mutation/audit.js +22 -0
  201. package/dist/operations/mutation/contradictions.d.ts +10 -0
  202. package/dist/operations/mutation/contradictions.d.ts.map +1 -0
  203. package/dist/operations/mutation/contradictions.js +40 -0
  204. package/dist/operations/mutation/delete.d.ts +5 -0
  205. package/dist/operations/mutation/delete.d.ts.map +1 -0
  206. package/dist/operations/mutation/delete.js +67 -0
  207. package/dist/operations/mutation/relationships.d.ts +17 -0
  208. package/dist/operations/mutation/relationships.d.ts.map +1 -0
  209. package/dist/operations/mutation/relationships.js +134 -0
  210. package/dist/operations/mutation/save.d.ts +4 -0
  211. package/dist/operations/mutation/save.d.ts.map +1 -0
  212. package/dist/operations/mutation/save.js +14 -0
  213. package/dist/operations/mutation/serialization.d.ts +5 -0
  214. package/dist/operations/mutation/serialization.d.ts.map +1 -0
  215. package/dist/operations/mutation/serialization.js +85 -0
  216. package/dist/operations/mutation/strict-fact.d.ts +4 -0
  217. package/dist/operations/mutation/strict-fact.d.ts.map +1 -0
  218. package/dist/operations/mutation/strict-fact.js +67 -0
  219. package/dist/operations/mutation/symbol-granularity.d.ts +4 -0
  220. package/dist/operations/mutation/symbol-granularity.d.ts.map +1 -0
  221. package/dist/operations/mutation/symbol-granularity.js +109 -0
  222. package/dist/operations/mutation/symbol-refresh.d.ts +10 -0
  223. package/dist/operations/mutation/symbol-refresh.d.ts.map +1 -0
  224. package/dist/operations/mutation/symbol-refresh.js +105 -0
  225. package/dist/operations/mutation/types.d.ts +43 -0
  226. package/dist/operations/mutation/types.d.ts.map +1 -0
  227. package/dist/operations/mutation/types.js +1 -0
  228. package/dist/operations/mutation/upsert.d.ts +5 -0
  229. package/dist/operations/mutation/upsert.d.ts.map +1 -0
  230. package/dist/operations/mutation/upsert.js +103 -0
  231. package/dist/operations/mutation/validate-upsert.d.ts +5 -0
  232. package/dist/operations/mutation/validate-upsert.d.ts.map +1 -0
  233. package/dist/operations/mutation/validate-upsert.js +50 -0
  234. package/dist/operations/mutation/validation.d.ts +5 -0
  235. package/dist/operations/mutation/validation.d.ts.map +1 -0
  236. package/dist/operations/mutation/validation.js +107 -0
  237. package/dist/operations/mutation/warnings.d.ts +4 -0
  238. package/dist/operations/mutation/warnings.d.ts.map +1 -0
  239. package/dist/operations/mutation/warnings.js +17 -0
  240. package/dist/operations/semantic-advisor/analysis-receipt.d.ts +5 -0
  241. package/dist/operations/semantic-advisor/analysis-receipt.d.ts.map +1 -0
  242. package/dist/operations/semantic-advisor/analysis-receipt.js +112 -0
  243. package/dist/operations/semantic-advisor/analyze-prose.d.ts +5 -0
  244. package/dist/operations/semantic-advisor/analyze-prose.d.ts.map +1 -0
  245. package/dist/operations/semantic-advisor/analyze-prose.js +271 -0
  246. package/dist/operations/semantic-advisor/clauses.d.ts +10 -0
  247. package/dist/operations/semantic-advisor/clauses.d.ts.map +1 -0
  248. package/dist/operations/semantic-advisor/clauses.js +43 -0
  249. package/dist/operations/semantic-advisor/observation-plan.d.ts +3 -0
  250. package/dist/operations/semantic-advisor/observation-plan.d.ts.map +1 -0
  251. package/dist/operations/semantic-advisor/observation-plan.js +19 -0
  252. package/dist/operations/semantic-advisor/predicate-rule.d.ts +14 -0
  253. package/dist/operations/semantic-advisor/predicate-rule.d.ts.map +1 -0
  254. package/dist/operations/semantic-advisor/predicate-rule.js +22 -0
  255. package/dist/operations/semantic-advisor/predicate-rules-core.d.ts +79 -0
  256. package/dist/operations/semantic-advisor/predicate-rules-core.d.ts.map +1 -0
  257. package/dist/operations/semantic-advisor/predicate-rules-core.js +140 -0
  258. package/dist/operations/semantic-advisor/predicate-rules-policy.d.ts +83 -0
  259. package/dist/operations/semantic-advisor/predicate-rules-policy.d.ts.map +1 -0
  260. package/dist/operations/semantic-advisor/predicate-rules-policy.js +150 -0
  261. package/dist/operations/semantic-advisor/predicate-rules-product-tail.d.ts +48 -0
  262. package/dist/operations/semantic-advisor/predicate-rules-product-tail.d.ts.map +1 -0
  263. package/dist/operations/semantic-advisor/predicate-rules-product-tail.js +102 -0
  264. package/dist/operations/semantic-advisor/predicate-rules-product.d.ts +71 -0
  265. package/dist/operations/semantic-advisor/predicate-rules-product.d.ts.map +1 -0
  266. package/dist/operations/semantic-advisor/predicate-rules-product.js +133 -0
  267. package/dist/operations/semantic-advisor/prose-coverage-evaluator.d.ts +29 -0
  268. package/dist/operations/semantic-advisor/prose-coverage-evaluator.d.ts.map +1 -0
  269. package/dist/operations/semantic-advisor/prose-coverage-evaluator.js +54 -0
  270. package/dist/operations/semantic-advisor/shared.d.ts +18 -0
  271. package/dist/operations/semantic-advisor/shared.d.ts.map +1 -0
  272. package/dist/operations/semantic-advisor/shared.js +209 -0
  273. package/dist/operations/semantic-advisor/strict-count-rules.d.ts +4 -0
  274. package/dist/operations/semantic-advisor/strict-count-rules.d.ts.map +1 -0
  275. package/dist/operations/semantic-advisor/strict-count-rules.js +62 -0
  276. package/dist/operations/semantic-advisor/strict-rules.d.ts +4 -0
  277. package/dist/operations/semantic-advisor/strict-rules.d.ts.map +1 -0
  278. package/dist/operations/semantic-advisor/strict-rules.js +106 -0
  279. package/dist/operations/semantic-advisor/types.d.ts +135 -0
  280. package/dist/operations/semantic-advisor/types.d.ts.map +1 -0
  281. package/dist/operations/semantic-advisor/types.js +1 -0
  282. package/dist/prolog/codec.d.ts.map +1 -1
  283. package/dist/prolog/codec.js +9 -2
  284. package/dist/prolog.d.ts +5 -0
  285. package/dist/prolog.d.ts.map +1 -1
  286. package/dist/prolog.js +82 -30
  287. package/dist/public/impact/analyzer.d.ts +3 -0
  288. package/dist/public/impact/analyzer.d.ts.map +1 -0
  289. package/dist/public/impact/analyzer.js +54 -0
  290. package/dist/public/impact/coverage-depth-quality.d.ts +4 -0
  291. package/dist/public/impact/coverage-depth-quality.d.ts.map +1 -0
  292. package/dist/public/impact/coverage-depth-quality.js +179 -0
  293. package/dist/public/impact/diagnostics.d.ts +7 -0
  294. package/dist/public/impact/diagnostics.d.ts.map +1 -0
  295. package/dist/public/impact/diagnostics.js +126 -0
  296. package/dist/public/impact/diff-meaning.d.ts +2 -0
  297. package/dist/public/impact/diff-meaning.d.ts.map +1 -0
  298. package/dist/public/impact/diff-meaning.js +101 -0
  299. package/dist/public/impact/full-kb-quality.d.ts +10 -0
  300. package/dist/public/impact/full-kb-quality.d.ts.map +1 -0
  301. package/dist/public/impact/full-kb-quality.js +191 -0
  302. package/dist/public/impact/manifest.d.ts +5 -0
  303. package/dist/public/impact/manifest.d.ts.map +1 -0
  304. package/dist/public/impact/manifest.js +43 -0
  305. package/dist/public/impact/requirement-quality.d.ts +4 -0
  306. package/dist/public/impact/requirement-quality.d.ts.map +1 -0
  307. package/dist/public/impact/requirement-quality.js +199 -0
  308. package/dist/public/impact/source-changes.d.ts +5 -0
  309. package/dist/public/impact/source-changes.d.ts.map +1 -0
  310. package/dist/public/impact/source-changes.js +129 -0
  311. package/dist/public/impact/summaries.d.ts +6 -0
  312. package/dist/public/impact/summaries.d.ts.map +1 -0
  313. package/dist/public/impact/summaries.js +68 -0
  314. package/dist/public/impact/symbol-quality-model.d.ts +21 -0
  315. package/dist/public/impact/symbol-quality-model.d.ts.map +1 -0
  316. package/dist/public/impact/symbol-quality-model.js +116 -0
  317. package/dist/public/impact/symbol-quality.d.ts +4 -0
  318. package/dist/public/impact/symbol-quality.d.ts.map +1 -0
  319. package/dist/public/impact/symbol-quality.js +159 -0
  320. package/dist/public/impact/types.d.ts +79 -0
  321. package/dist/public/impact/types.d.ts.map +1 -0
  322. package/dist/public/impact/types.js +1 -0
  323. package/dist/public/impact-diagnostics.d.ts +7 -0
  324. package/dist/public/impact-diagnostics.d.ts.map +1 -0
  325. package/dist/public/impact-diagnostics.js +5 -0
  326. package/dist/public/operations/catalog.d.ts +907 -0
  327. package/dist/public/operations/catalog.d.ts.map +1 -0
  328. package/dist/public/operations/catalog.js +42 -0
  329. package/dist/public/operations/check-executor.d.ts +21 -0
  330. package/dist/public/operations/check-executor.d.ts.map +1 -0
  331. package/dist/public/operations/check-executor.js +111 -0
  332. package/dist/public/operations/check-format-shared.d.ts +36 -0
  333. package/dist/public/operations/check-format-shared.d.ts.map +1 -0
  334. package/dist/public/operations/check-format-shared.js +107 -0
  335. package/dist/public/operations/check-helpers.d.ts +10 -0
  336. package/dist/public/operations/check-helpers.d.ts.map +1 -0
  337. package/dist/public/operations/check-helpers.js +107 -0
  338. package/dist/public/operations/discovery-entities.d.ts +14 -0
  339. package/dist/public/operations/discovery-entities.d.ts.map +1 -0
  340. package/dist/public/operations/discovery-entities.js +91 -0
  341. package/dist/public/operations/discovery-executors.d.ts +39 -0
  342. package/dist/public/operations/discovery-executors.d.ts.map +1 -0
  343. package/dist/public/operations/discovery-executors.js +101 -0
  344. package/dist/public/operations/index.d.ts +20 -0
  345. package/dist/public/operations/index.d.ts.map +1 -0
  346. package/dist/public/operations/index.js +18 -0
  347. package/dist/public/operations/node-ports.d.ts +15 -0
  348. package/dist/public/operations/node-ports.d.ts.map +1 -0
  349. package/dist/public/operations/node-ports.js +57 -0
  350. package/dist/public/operations/prolog-json.d.ts +5 -0
  351. package/dist/public/operations/prolog-json.d.ts.map +1 -0
  352. package/dist/public/operations/prolog-json.js +44 -0
  353. package/dist/public/operations/runtime-types.d.ts +69 -0
  354. package/dist/public/operations/runtime-types.d.ts.map +1 -0
  355. package/dist/public/operations/runtime-types.js +17 -0
  356. package/dist/public/operations/specs/autopilot.d.ts +82 -0
  357. package/dist/public/operations/specs/autopilot.d.ts.map +1 -0
  358. package/dist/public/operations/specs/autopilot.js +72 -0
  359. package/dist/public/operations/specs/check.d.ts +51 -0
  360. package/dist/public/operations/specs/check.d.ts.map +1 -0
  361. package/dist/public/operations/specs/check.js +62 -0
  362. package/dist/public/operations/specs/discovery.d.ts +94 -0
  363. package/dist/public/operations/specs/discovery.d.ts.map +1 -0
  364. package/dist/public/operations/specs/discovery.js +98 -0
  365. package/dist/public/operations/specs/modeling.d.ts +126 -0
  366. package/dist/public/operations/specs/modeling.d.ts.map +1 -0
  367. package/dist/public/operations/specs/modeling.js +117 -0
  368. package/dist/public/operations/specs/mutation-schemas.d.ts +233 -0
  369. package/dist/public/operations/specs/mutation-schemas.d.ts.map +1 -0
  370. package/dist/public/operations/specs/mutation-schemas.js +267 -0
  371. package/dist/public/operations/specs/mutation.d.ts +56 -0
  372. package/dist/public/operations/specs/mutation.d.ts.map +1 -0
  373. package/dist/public/operations/specs/mutation.js +44 -0
  374. package/dist/public/operations/specs/reporting.d.ts +185 -0
  375. package/dist/public/operations/specs/reporting.d.ts.map +1 -0
  376. package/dist/public/operations/specs/reporting.js +158 -0
  377. package/dist/public/operations/specs/semantic.d.ts +53 -0
  378. package/dist/public/operations/specs/semantic.d.ts.map +1 -0
  379. package/dist/public/operations/specs/semantic.js +105 -0
  380. package/dist/public/operations/specs/skills.d.ts +70 -0
  381. package/dist/public/operations/specs/skills.d.ts.map +1 -0
  382. package/dist/public/operations/specs/skills.js +107 -0
  383. package/dist/public/operations/specs/sparql.d.ts +39 -0
  384. package/dist/public/operations/specs/sparql.d.ts.map +1 -0
  385. package/dist/public/operations/specs/sparql.js +121 -0
  386. package/dist/public/operations/specs/upsert.d.ts +256 -0
  387. package/dist/public/operations/specs/upsert.d.ts.map +1 -0
  388. package/dist/public/operations/specs/upsert.js +27 -0
  389. package/dist/public/operations/types.d.ts +24 -0
  390. package/dist/public/operations/types.d.ts.map +1 -0
  391. package/dist/public/operations/types.js +1 -0
  392. package/dist/public/schemas/entity.d.ts.map +1 -1
  393. package/dist/public/schemas/entity.js +48 -0
  394. package/dist/public/skill-system/errors.d.ts +19 -0
  395. package/dist/public/skill-system/errors.d.ts.map +1 -0
  396. package/dist/public/skill-system/errors.js +36 -0
  397. package/dist/public/skill-system/loader.d.ts +9 -0
  398. package/dist/public/skill-system/loader.d.ts.map +1 -0
  399. package/dist/public/skill-system/loader.js +76 -0
  400. package/dist/public/skill-system/paths.d.ts +6 -0
  401. package/dist/public/skill-system/paths.d.ts.map +1 -0
  402. package/dist/public/skill-system/paths.js +25 -0
  403. package/dist/public/skill-system/types.d.ts +15 -0
  404. package/dist/public/skill-system/types.d.ts.map +1 -0
  405. package/dist/public/skill-system/types.js +1 -0
  406. package/dist/public/skill-system/validation.d.ts +10 -0
  407. package/dist/public/skill-system/validation.d.ts.map +1 -0
  408. package/dist/public/skill-system/validation.js +119 -0
  409. package/dist/public/skills/init-kibi/SKILL.md +62 -0
  410. package/dist/public/skills/kibi-freshness/SKILL.md +44 -0
  411. package/dist/public/skills/kibi-traceability/SKILL.md +54 -0
  412. package/dist/public/skills/kibi-usage/SKILL.md +123 -95
  413. package/dist/public/skills/kibi-usage/resources/fact-lanes.md +107 -5
  414. package/dist/public/skills/kibi-usage/resources/operation-access.md +44 -0
  415. package/dist/public/skills/kibi-usage/resources/relationship-directions.md +30 -0
  416. package/dist/public/skills/kibi-usage/resources/workflows.md +40 -3
  417. package/dist/public/skills.d.ts +4 -41
  418. package/dist/public/skills.d.ts.map +1 -1
  419. package/dist/public/skills.js +3 -270
  420. package/dist/public/symbol-granularity.d.ts +1 -1
  421. package/dist/public/symbol-granularity.d.ts.map +1 -1
  422. package/dist/public/symbol-granularity.js +2 -0
  423. package/dist/runtime/cli-runtime.d.ts +3 -0
  424. package/dist/runtime/cli-runtime.d.ts.map +1 -0
  425. package/dist/runtime/cli-runtime.js +96 -0
  426. package/dist/schemas/entity.schema.json +23 -0
  427. package/dist/traceability/evidence-model.d.ts +1 -1
  428. package/dist/traceability/evidence-model.d.ts.map +1 -1
  429. package/dist/traceability/evidence-model.js +1 -1
  430. package/dist/traceability/staged-diagnostics.d.ts +6 -6
  431. package/dist/traceability/staged-diagnostics.d.ts.map +1 -1
  432. package/dist/traceability/staged-diagnostics.js +12 -6
  433. package/dist/traceability/staged-impact-contract.js +1 -1
  434. package/dist/traceability/staged-symbols-manifest.d.ts +1 -0
  435. package/dist/traceability/staged-symbols-manifest.d.ts.map +1 -1
  436. package/dist/traceability/staged-symbols-manifest.js +60 -27
  437. package/dist/traceability/symbol-extract.d.ts.map +1 -1
  438. package/dist/traceability/symbol-extract.js +58 -1
  439. package/dist/traceability/temp-kb.d.ts.map +1 -1
  440. package/dist/traceability/temp-kb.js +34 -1
  441. package/dist/types/entities.d.ts +8 -1
  442. package/dist/types/entities.d.ts.map +1 -1
  443. package/dist/utils/prolog-query-plan-safety.d.ts +8 -0
  444. package/dist/utils/prolog-query-plan-safety.d.ts.map +1 -0
  445. package/dist/utils/prolog-query-plan-safety.js +47 -0
  446. package/dist/utils/rule-registry.d.ts.map +1 -1
  447. package/dist/utils/rule-registry.js +18 -0
  448. package/package.json +60 -2
  449. package/schema/entities.pl +4 -0
  450. package/src/public/impact/analyzer.ts +90 -0
  451. package/src/public/impact/coverage-depth-quality.ts +268 -0
  452. package/src/public/impact/diagnostics.ts +199 -0
  453. package/src/public/impact/diff-meaning.ts +121 -0
  454. package/src/public/impact/full-kb-quality.ts +230 -0
  455. package/src/public/impact/manifest.ts +57 -0
  456. package/src/public/impact/requirement-quality.ts +262 -0
  457. package/src/public/impact/source-changes.ts +180 -0
  458. package/src/public/impact/summaries.ts +100 -0
  459. package/src/public/impact/symbol-quality-model.ts +171 -0
  460. package/src/public/impact/symbol-quality.ts +207 -0
  461. package/src/public/impact/types.ts +99 -0
  462. package/src/public/impact-diagnostics.ts +22 -0
  463. package/src/public/operations/catalog.ts +60 -0
  464. package/src/public/operations/check-executor.ts +185 -0
  465. package/src/public/operations/check-format-shared.ts +178 -0
  466. package/src/public/operations/check-helpers.ts +141 -0
  467. package/src/public/operations/discovery-entities.ts +122 -0
  468. package/src/public/operations/discovery-executors.ts +176 -0
  469. package/src/public/operations/index.ts +19 -0
  470. package/src/public/operations/node-ports.ts +78 -0
  471. package/src/public/operations/prolog-json.ts +71 -0
  472. package/src/public/operations/runtime-types.ts +106 -0
  473. package/src/public/operations/specs/autopilot.ts +98 -0
  474. package/src/public/operations/specs/check.ts +72 -0
  475. package/src/public/operations/specs/discovery.ts +126 -0
  476. package/src/public/operations/specs/modeling.ts +154 -0
  477. package/src/public/operations/specs/mutation-schemas.ts +296 -0
  478. package/src/public/operations/specs/mutation.ts +58 -0
  479. package/src/public/operations/specs/reporting.ts +249 -0
  480. package/src/public/operations/specs/semantic.ts +135 -0
  481. package/src/public/operations/specs/skills.ts +142 -0
  482. package/src/public/operations/specs/sparql.ts +149 -0
  483. package/src/public/operations/specs/upsert.ts +40 -0
  484. package/src/public/operations/types.ts +57 -0
  485. package/src/public/schemas/entity.ts +50 -0
  486. package/src/public/skill-system/errors.ts +38 -0
  487. package/src/public/skill-system/loader.ts +108 -0
  488. package/src/public/skill-system/paths.ts +27 -0
  489. package/src/public/skill-system/types.ts +14 -0
  490. package/src/public/skill-system/validation.ts +175 -0
  491. package/src/public/skills/init-kibi/SKILL.md +62 -0
  492. package/src/public/skills/kibi-freshness/SKILL.md +44 -0
  493. package/src/public/skills/kibi-traceability/SKILL.md +54 -0
  494. package/src/public/skills/kibi-usage/SKILL.md +123 -95
  495. package/src/public/skills/kibi-usage/resources/fact-lanes.md +107 -5
  496. package/src/public/skills/kibi-usage/resources/operation-access.md +44 -0
  497. package/src/public/skills/kibi-usage/resources/relationship-directions.md +30 -0
  498. package/src/public/skills/kibi-usage/resources/workflows.md +40 -3
  499. package/src/public/skills.ts +18 -427
  500. package/src/public/symbol-granularity.ts +4 -0
  501. package/src/schemas/entity.schema.json +23 -0
@@ -0,0 +1,22 @@
1
+ import { normalizeKey, normalizePredicateToken, normalizeSubjectKey, predicateSuggestion, singularize, } from "./shared.js";
2
+ export { normalizeKey, normalizePredicateToken, normalizeSubjectKey, singularize, };
3
+ // implements REQ-mcp-semantic-advisor-preflight
4
+ export function detectPredicateRules(payload, statement, rules) {
5
+ for (const rule of rules) {
6
+ if (rule.accepts && !rule.accepts(statement))
7
+ continue;
8
+ const match = statement.match(rule.pattern);
9
+ if (!match?.groups)
10
+ continue;
11
+ return predicateSuggestion(payload, match[0], rule.name, rule.args(match.groups), rule.rationale, rule.polarity);
12
+ }
13
+ return null;
14
+ }
15
+ // implements REQ-mcp-semantic-advisor-preflight
16
+ export function commaList(value, separator = /,|\band\b/i) {
17
+ return value
18
+ .split(separator)
19
+ .map((part) => normalizeKey(part.trim()))
20
+ .filter(Boolean)
21
+ .join(",");
22
+ }
@@ -0,0 +1,79 @@
1
+ import { commaList } from "./predicate-rule.js";
2
+ export declare const CORE_PREDICATE_RULES: readonly [{
3
+ readonly pattern: RegExp;
4
+ readonly name: "guard";
5
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
6
+ readonly rationale: "Disabled-until prose defines a condition that guards behavior availability and should be queryable as a predicate.";
7
+ }, {
8
+ readonly pattern: RegExp;
9
+ readonly name: "temporal_order";
10
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
11
+ readonly rationale: "Before/after ordering is relational temporal logic and should be modeled as a predicate.";
12
+ }, {
13
+ readonly pattern: RegExp;
14
+ readonly name: "conditional_behavior";
15
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
16
+ readonly rationale: "If/then requirement prose is conditional behavior and should be queryable as a predicate.";
17
+ }, {
18
+ readonly pattern: RegExp;
19
+ readonly name: "conditional_behavior";
20
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
21
+ readonly rationale: "When/must prose is conditional behavior and should be queryable as a predicate.";
22
+ }, {
23
+ readonly pattern: RegExp;
24
+ readonly name: "exception_rule";
25
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
26
+ readonly rationale: "Unless/except prose defines an explicit exception to required behavior and should be queryable as a predicate.";
27
+ }, {
28
+ readonly pattern: RegExp;
29
+ readonly name: "mutual_exclusion";
30
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
31
+ readonly rationale: "Mutual-exclusion prose is a relational constraint and should be queryable as a predicate.";
32
+ }, {
33
+ readonly pattern: RegExp;
34
+ readonly name: "dependency_rule";
35
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
36
+ readonly rationale: "Requires-before prose defines a prerequisite relationship and should be queryable as a predicate.";
37
+ }, {
38
+ readonly pattern: RegExp;
39
+ readonly name: "ownership_rule";
40
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
41
+ readonly rationale: "Ownership prose assigns responsibility for a resource or behavior and should be queryable as a predicate.";
42
+ }, {
43
+ readonly pattern: RegExp;
44
+ readonly name: "merge_policy";
45
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
46
+ readonly rationale: "Same-slot merge prose defines ontology-lite merge behavior and should be queryable as a predicate.";
47
+ }, {
48
+ readonly pattern: RegExp;
49
+ readonly name: "retry_policy";
50
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
51
+ readonly rationale: "Retry prose defines bounded recovery behavior and should be queryable as a predicate.";
52
+ }, {
53
+ readonly pattern: RegExp;
54
+ readonly name: "escalation_rule";
55
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
56
+ readonly rationale: "Escalation prose defines delayed handoff behavior and should be queryable as a predicate.";
57
+ }, {
58
+ readonly pattern: RegExp;
59
+ readonly name: "availability_sla";
60
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
61
+ readonly rationale: "Availability SLA prose defines a service target over a window and should be queryable as a predicate.";
62
+ }, {
63
+ readonly pattern: RegExp;
64
+ readonly name: "notification_route";
65
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
66
+ readonly rationale: "Notification routing prose defines a recipient and channel and should be queryable as a predicate.";
67
+ }, {
68
+ readonly pattern: RegExp;
69
+ readonly name: "idempotency_rule";
70
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
71
+ readonly rationale: "Idempotency prose defines deduplication behavior and should be queryable as a predicate.";
72
+ }, {
73
+ readonly pattern: RegExp;
74
+ readonly name: "idempotency_rule";
75
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
76
+ readonly rationale: "Deduplication prose defines idempotent handling of repeated or concurrent operations and should be queryable as a predicate.";
77
+ }];
78
+ export { commaList };
79
+ //# sourceMappingURL=predicate-rules-core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predicate-rules-core.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/predicate-rules-core.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EAKV,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuKY,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,140 @@
1
+ import { commaList, normalizeKey, normalizePredicateToken, normalizeSubjectKey, singularize, } from "./predicate-rule.js";
2
+ export const CORE_PREDICATE_RULES = [
3
+ {
4
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)?\s*(?:stay|remain)?\s*disabled\s+until\s+(?<condition>.+?)\.?$/i,
5
+ name: "guard",
6
+ args: (g) => [
7
+ normalizeKey(g.subject ?? ""),
8
+ normalizePredicateToken(g.condition ?? ""),
9
+ "disabled",
10
+ ],
11
+ rationale: "Disabled-until prose defines a condition that guards behavior availability and should be queryable as a predicate.",
12
+ },
13
+ {
14
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<before>[a-z][a-z\s_-]*?)\s+before\s+(?<after>.+?)\.?$/i,
15
+ name: "temporal_order",
16
+ args: (g) => [
17
+ normalizeKey(g.subject ?? "").replace(/_/g, "."),
18
+ normalizePredicateToken(g.before ?? ""),
19
+ normalizePredicateToken(g.after ?? ""),
20
+ ],
21
+ rationale: "Before/after ordering is relational temporal logic and should be modeled as a predicate.",
22
+ },
23
+ {
24
+ pattern: /^if\s+(?:(?:a|an|the)\s+)?(?<conditionSubject>[a-z][a-z_-]*)\s+(?<condition>.+?),\s*(?:it|they|the\s+[a-z][a-z\s_-]*?)\s+(?<behavior>.+?)\.?$/i,
25
+ name: "conditional_behavior",
26
+ args: (g) => [
27
+ singularize(normalizeKey(g.conditionSubject ?? "")),
28
+ normalizePredicateToken(g.condition ?? ""),
29
+ normalizePredicateToken(g.behavior ?? ""),
30
+ ],
31
+ rationale: "If/then requirement prose is conditional behavior and should be queryable as a predicate.",
32
+ },
33
+ {
34
+ pattern: /^when\s+(?<condition>.+?),\s*(?:the\s+)?(?<subject>.+?)\s+(?:must|shall|should)\s+(?<behavior>.+?)\.?$/i,
35
+ name: "conditional_behavior",
36
+ args: (g) => [
37
+ normalizeKey(g.subject ?? ""),
38
+ normalizePredicateToken(g.condition ?? ""),
39
+ normalizePredicateToken(g.behavior ?? "behavior"),
40
+ ],
41
+ rationale: "When/must prose is conditional behavior and should be queryable as a predicate.",
42
+ },
43
+ {
44
+ pattern: /^(?:the\s+)?(?<subject>[a-z][a-z\s_-]*?)\s+(?:must|shall|should)\s+(?<behavior>.+?)\s+unless\s+(?:the\s+)?(?<exception>.+?)\.?$/i,
45
+ name: "exception_rule",
46
+ args: (g) => [
47
+ normalizeSubjectKey(g.subject ?? ""),
48
+ normalizePredicateToken(g.behavior ?? ""),
49
+ normalizePredicateToken(g.exception ?? ""),
50
+ ],
51
+ rationale: "Unless/except prose defines an explicit exception to required behavior and should be queryable as a predicate.",
52
+ },
53
+ {
54
+ pattern: /^(?<left>.+?)\s+and\s+(?<right>.+?)\s+(?:must|shall|should)\s+be\s+mutually\s+exclusive\.?$/i,
55
+ name: "mutual_exclusion",
56
+ args: (g) => [normalizeKey(g.left ?? ""), normalizeKey(g.right ?? "")],
57
+ rationale: "Mutual-exclusion prose is a relational constraint and should be queryable as a predicate.",
58
+ },
59
+ {
60
+ pattern: /^(?<subject>.+?)\s+requires\s+(?<prerequisite>.+?)\s+before\s+(?<dependent>.+?)\.?$/i,
61
+ name: "dependency_rule",
62
+ args: (g) => [
63
+ normalizeKey(g.subject ?? ""),
64
+ normalizePredicateToken(g.prerequisite ?? ""),
65
+ normalizePredicateToken(g.dependent ?? ""),
66
+ ],
67
+ rationale: "Requires-before prose defines a prerequisite relationship and should be queryable as a predicate.",
68
+ },
69
+ {
70
+ pattern: /^(?<resource>.+?)\s+(?:is|are)\s+owned\s+by\s+(?:the\s+)?(?<owner>.+?)\.?$/i,
71
+ name: "ownership_rule",
72
+ args: (g) => [normalizeKey(g.resource ?? ""), normalizeKey(g.owner ?? "")],
73
+ rationale: "Ownership prose assigns responsibility for a resource or behavior and should be queryable as a predicate.",
74
+ },
75
+ {
76
+ pattern: /^(?<inputs>.+?)\s+saved\s+in\s+the\s+same\s+(?<slot>.+?)\s+must\s+merge\s+into\s+(?<target>.+?)\s+instead\s+of\s+creating\s+.+?\.?$/i,
77
+ name: "merge_policy",
78
+ args: (g) => [
79
+ normalizePredicateToken(g.inputs ?? ""),
80
+ normalizePredicateToken(g.slot ?? ""),
81
+ normalizePredicateToken(g.target ?? ""),
82
+ ],
83
+ rationale: "Same-slot merge prose defines ontology-lite merge behavior and should be queryable as a predicate.",
84
+ },
85
+ {
86
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+retry\s+up\s+to\s+(?<count>\d+)\s+(?<unit>times|attempts?)\.?$/i,
87
+ name: "retry_policy",
88
+ args: (g) => [
89
+ normalizeKey(g.subject ?? ""),
90
+ g.count ?? "",
91
+ normalizeKey(g.unit ?? ""),
92
+ ],
93
+ rationale: "Retry prose defines bounded recovery behavior and should be queryable as a predicate.",
94
+ },
95
+ {
96
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+escalate\s+to\s+(?<target>.+?)\s+after\s+(?<delay>\d+)\s+(?<unit>[a-z]+)\.?$/i,
97
+ name: "escalation_rule",
98
+ args: (g) => [
99
+ normalizeKey(g.subject ?? ""),
100
+ normalizeKey(g.target ?? ""),
101
+ g.delay ?? "",
102
+ normalizeKey(g.unit ?? ""),
103
+ ],
104
+ rationale: "Escalation prose defines delayed handoff behavior and should be queryable as a predicate.",
105
+ },
106
+ {
107
+ pattern: /^(?<subject>.+?)\s+availability\s+(?:must|shall|should)\s+be\s+at\s+least\s+(?<threshold>\d+(?:\.\d+)?)\s+(?<unit>percent|%)\s+(?<window>[a-z]+)\.?$/i,
108
+ name: "availability_sla",
109
+ args: (g) => [
110
+ normalizeKey(g.subject ?? ""),
111
+ g.threshold ?? "",
112
+ g.unit === "%" ? "percent" : normalizeKey(g.unit ?? ""),
113
+ normalizeKey(g.window ?? ""),
114
+ ],
115
+ rationale: "Availability SLA prose defines a service target over a window and should be queryable as a predicate.",
116
+ },
117
+ {
118
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+notify\s+(?<recipient>.+?)\s+by\s+(?<channel>[a-z]+)\.?$/i,
119
+ name: "notification_route",
120
+ args: (g) => [
121
+ normalizeKey(g.subject ?? ""),
122
+ normalizeKey(g.recipient ?? ""),
123
+ normalizeKey(g.channel ?? ""),
124
+ ],
125
+ rationale: "Notification routing prose defines a recipient and channel and should be queryable as a predicate.",
126
+ },
127
+ {
128
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+idempotent\s+by\s+(?<key>.+?)\.?$/i,
129
+ name: "idempotency_rule",
130
+ args: (g) => [normalizeKey(g.subject ?? ""), normalizeKey(g.key ?? "")],
131
+ rationale: "Idempotency prose defines deduplication behavior and should be queryable as a predicate.",
132
+ },
133
+ {
134
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+deduplicated\s+to\s+prevent\s+redundant\s+requests\s+during\s+(?<key>.+?)\.?$/i,
135
+ name: "idempotency_rule",
136
+ args: (g) => [normalizeKey(g.subject ?? ""), normalizeKey(g.key ?? "")],
137
+ rationale: "Deduplication prose defines idempotent handling of repeated or concurrent operations and should be queryable as a predicate.",
138
+ },
139
+ ];
140
+ export { commaList };
@@ -0,0 +1,83 @@
1
+ export declare const POLICY_PREDICATE_RULES: readonly [{
2
+ readonly pattern: RegExp;
3
+ readonly name: "data_residency_rule";
4
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
5
+ readonly rationale: "Data residency prose defines regional storage or processing constraints and should be queryable as a predicate.";
6
+ }, {
7
+ readonly pattern: RegExp;
8
+ readonly name: "audit_event_rule";
9
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
10
+ readonly rationale: "Audit logging prose defines durable audit evidence and should be queryable as a predicate.";
11
+ }, {
12
+ readonly pattern: RegExp;
13
+ readonly name: "consent_rule";
14
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
15
+ readonly rationale: "Consent prose defines a privacy prerequisite and should be queryable as a predicate.";
16
+ }, {
17
+ readonly pattern: RegExp;
18
+ readonly name: "lifecycle_rule";
19
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
20
+ readonly rationale: "Lifecycle prose defines archive/delete/expiry behavior over time and should be queryable as a predicate.";
21
+ }, {
22
+ readonly pattern: RegExp;
23
+ readonly name: "conflict_resolution_rule";
24
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
25
+ readonly rationale: "Conflict-resolution prose defines synchronization merge behavior and should be queryable as a predicate.";
26
+ }, {
27
+ readonly pattern: RegExp;
28
+ readonly name: "fallback_rule";
29
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
30
+ readonly rationale: "Fallback prose defines degraded behavior under a condition and should be queryable as a predicate.";
31
+ }, {
32
+ readonly pattern: RegExp;
33
+ readonly name: "batch_operation_rule";
34
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
35
+ readonly rationale: "Batching prose defines bounded bulk-processing behavior and should be queryable as a predicate.";
36
+ }, {
37
+ readonly pattern: RegExp;
38
+ readonly name: "consistency_rule";
39
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
40
+ readonly rationale: "Consistency prose defines reference integrity and should be queryable as a predicate.";
41
+ }, {
42
+ readonly pattern: RegExp;
43
+ readonly name: "build_constraint";
44
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
45
+ readonly rationale: "Build-time prose defines deterministic generation or deployment constraints and should be queryable as a predicate.";
46
+ }, {
47
+ readonly pattern: RegExp;
48
+ readonly name: "environment_safety_rule";
49
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
50
+ readonly rationale: "Environment safety prose defines action permissions by deployment environment and should be queryable as a predicate.";
51
+ }, {
52
+ readonly pattern: RegExp;
53
+ readonly name: "schema_invariant_rule";
54
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
55
+ readonly rationale: "Schema invariant prose defines a field-level invariant and should be queryable as a predicate.";
56
+ }, {
57
+ readonly pattern: RegExp;
58
+ readonly name: "coding_standard_rule";
59
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
60
+ readonly rationale: "Coding-standard prose defines developer-facing API or pattern requirements and should be queryable as a predicate.";
61
+ readonly accepts: (statement: string) => boolean;
62
+ }, {
63
+ readonly pattern: RegExp;
64
+ readonly name: "migration_boundary_rule";
65
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
66
+ readonly rationale: "Migration-boundary prose defines legacy input usage limits and should be queryable as a predicate.";
67
+ }, {
68
+ readonly pattern: RegExp;
69
+ readonly name: "absence_requirement";
70
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
71
+ readonly rationale: "Absence prose defines negative existence requirements and should be queryable as a predicate.";
72
+ }, {
73
+ readonly pattern: RegExp;
74
+ readonly name: "absence_requirement";
75
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
76
+ readonly rationale: "Declarative no-X prose defines a negative existence requirement and should be queryable as a predicate.";
77
+ }, {
78
+ readonly pattern: RegExp;
79
+ readonly name: "offline_behavior_rule";
80
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
81
+ readonly rationale: "Offline behavior prose defines resilient/non-blocking behavior under offline conditions and should be queryable as a predicate.";
82
+ }];
83
+ //# sourceMappingURL=predicate-rules-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predicate-rules-policy.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/predicate-rules-policy.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsLU,CAAC"}
@@ -0,0 +1,150 @@
1
+ import { normalizeKey, normalizePredicateToken, } from "./predicate-rule.js";
2
+ export const POLICY_PREDICATE_RULES = [
3
+ {
4
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?:stored|processed|kept)\s+in\s+(?:the\s+)?(?<region>.+?\b(?:region|jurisdiction|country|zone|area))\.?$/i,
5
+ name: "data_residency_rule",
6
+ args: (g) => [normalizeKey(g.subject ?? ""), normalizeKey(g.region ?? "")],
7
+ rationale: "Data residency prose defines regional storage or processing constraints and should be queryable as a predicate.",
8
+ },
9
+ {
10
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?:recorded|logged|audited)\s+in\s+(?:the\s+)?(?<log>audit\s+(?:log|trail))\.?$/i,
11
+ name: "audit_event_rule",
12
+ args: (g) => [normalizeKey(g.subject ?? ""), normalizeKey(g.log ?? "")],
13
+ rationale: "Audit logging prose defines durable audit evidence and should be queryable as a predicate.",
14
+ },
15
+ {
16
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+require\s+(?<consent>.+?consent)\s+before\s+(?<purpose>.+?)\.?$/i,
17
+ name: "consent_rule",
18
+ args: (g) => [
19
+ normalizeKey(g.subject ?? ""),
20
+ normalizeKey(g.consent ?? ""),
21
+ normalizePredicateToken(g.purpose ?? ""),
22
+ ],
23
+ rationale: "Consent prose defines a privacy prerequisite and should be queryable as a predicate.",
24
+ },
25
+ {
26
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<action>archived|deleted|expired)\s+after\s+(?<duration>\d+)\s+(?<unit>[a-z]+)\.?$/i,
27
+ name: "lifecycle_rule",
28
+ args: (g) => [
29
+ normalizeKey(g.subject ?? ""),
30
+ normalizeKey(g.action ?? ""),
31
+ g.duration ?? "",
32
+ normalizeKey(g.unit ?? ""),
33
+ ],
34
+ rationale: "Lifecycle prose defines archive/delete/expiry behavior over time and should be queryable as a predicate.",
35
+ },
36
+ {
37
+ pattern: /^when\s+(?<subject>.+?)\s+conflicts?,\s+(?:the\s+)?(?<strategy>.+?)\.?$/i,
38
+ name: "conflict_resolution_rule",
39
+ args: (g) => [
40
+ normalizeKey(g.subject ?? ""),
41
+ normalizePredicateToken(g.strategy ?? ""),
42
+ ],
43
+ rationale: "Conflict-resolution prose defines synchronization merge behavior and should be queryable as a predicate.",
44
+ },
45
+ {
46
+ pattern: /^if\s+(?<condition>.+?),\s+(?<subject>.+?)\s+(?:must|shall|should)\s+fall\s+back\s+to\s+(?<target>.+?)\.?$/i,
47
+ name: "fallback_rule",
48
+ args: (g) => [
49
+ normalizePredicateToken(g.condition ?? ""),
50
+ normalizeKey(g.subject ?? ""),
51
+ normalizePredicateToken(g.target ?? ""),
52
+ ],
53
+ rationale: "Fallback prose defines degraded behavior under a condition and should be queryable as a predicate.",
54
+ },
55
+ {
56
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+process\s+(?<resource>.+?)\s+in\s+batches\s+of\s+(?<size>\d+)\.?$/i,
57
+ name: "batch_operation_rule",
58
+ args: (g) => [
59
+ normalizeKey(g.subject ?? ""),
60
+ normalizeKey(g.resource ?? ""),
61
+ g.size ?? "",
62
+ ],
63
+ rationale: "Batching prose defines bounded bulk-processing behavior and should be queryable as a predicate.",
64
+ },
65
+ {
66
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+reference\s+(?<target>an?\s+existing\s+.+?)\.?$/i,
67
+ name: "consistency_rule",
68
+ args: (g) => [
69
+ normalizeKey(g.subject ?? ""),
70
+ normalizePredicateToken(g.target ?? ""),
71
+ ],
72
+ rationale: "Consistency prose defines reference integrity and should be queryable as a predicate.",
73
+ },
74
+ {
75
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<property>deterministic)\s+at\s+(?<scope>build\s+time)\.?$/i,
76
+ name: "build_constraint",
77
+ args: (g) => [
78
+ normalizeKey(g.subject ?? ""),
79
+ normalizePredicateToken(g.property ?? "property"),
80
+ normalizePredicateToken(g.scope ?? "scope"),
81
+ ],
82
+ rationale: "Build-time prose defines deterministic generation or deployment constraints and should be queryable as a predicate.",
83
+ },
84
+ {
85
+ pattern: /^(?<action>.+?)\s+(?:must|shall|should)\s+be\s+(?<decision>forbidden|read-only|allowed)\s+in\s+(?<environment>production|staging|development)\.?$/i,
86
+ name: "environment_safety_rule",
87
+ args: (g) => [
88
+ normalizeKey(g.action ?? ""),
89
+ normalizePredicateToken(g.decision ?? "decision"),
90
+ normalizeKey(g.environment ?? ""),
91
+ ],
92
+ rationale: "Environment safety prose defines action permissions by deployment environment and should be queryable as a predicate.",
93
+ },
94
+ {
95
+ pattern: /^(?<field>.+?)\s+(?:must|shall|should)\s+be\s+(?<kind>immutable)\s+after\s+(?<scope>.+?)\.?$/i,
96
+ name: "schema_invariant_rule",
97
+ args: (g) => [
98
+ normalizeKey(g.field ?? ""),
99
+ normalizePredicateToken(g.kind ?? "invariant"),
100
+ normalizePredicateToken(`after ${g.scope ?? ""}`),
101
+ ],
102
+ rationale: "Schema invariant prose defines a field-level invariant and should be queryable as a predicate.",
103
+ },
104
+ {
105
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+(?<action>use|avoid)\s+(?<target>.+?)\.?$/i,
106
+ name: "coding_standard_rule",
107
+ args: (g) => [
108
+ normalizeKey(g.subject ?? ""),
109
+ normalizePredicateToken(g.action ?? "action"),
110
+ normalizePredicateToken(g.target ?? ""),
111
+ ],
112
+ rationale: "Coding-standard prose defines developer-facing API or pattern requirements and should be queryable as a predicate.",
113
+ accepts: (statement) => /\b(?:api|apis|code|component|computed|framework|hook|pattern|signal|schema|type)\b/i.test(statement),
114
+ },
115
+ {
116
+ pattern: /^(?<subject>.+?)\s+may\s+only\s+be\s+(?<action>read)\s+as\s+(?<scope>migration\s+input)(?:\s+by\s+.+?)?\.?$/i,
117
+ name: "migration_boundary_rule",
118
+ args: (g) => [
119
+ normalizeKey(g.subject ?? ""),
120
+ normalizePredicateToken(g.action ?? "action"),
121
+ normalizePredicateToken(g.scope ?? ""),
122
+ ],
123
+ rationale: "Migration-boundary prose defines legacy input usage limits and should be queryable as a predicate.",
124
+ },
125
+ {
126
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<state>absent|removed)\.?$/i,
127
+ name: "absence_requirement",
128
+ args: (g) => [
129
+ normalizePredicateToken(g.subject ?? ""),
130
+ normalizePredicateToken(g.state ?? ""),
131
+ ],
132
+ rationale: "Absence prose defines negative existence requirements and should be queryable as a predicate.",
133
+ },
134
+ {
135
+ pattern: /^no\s+(?<subject>.+?)\.?$/i,
136
+ name: "absence_requirement",
137
+ args: (g) => [normalizePredicateToken(g.subject ?? ""), "absent"],
138
+ rationale: "Declarative no-X prose defines a negative existence requirement and should be queryable as a predicate.",
139
+ },
140
+ {
141
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+(?<behavior>non-blocking|resilient)\s+during\s+(?<condition>offline\s+conditions)\.?$/i,
142
+ name: "offline_behavior_rule",
143
+ args: (g) => [
144
+ normalizeKey(g.subject ?? ""),
145
+ normalizePredicateToken(g.behavior ?? "behavior"),
146
+ normalizePredicateToken(g.condition ?? ""),
147
+ ],
148
+ rationale: "Offline behavior prose defines resilient/non-blocking behavior under offline conditions and should be queryable as a predicate.",
149
+ },
150
+ ];
@@ -0,0 +1,48 @@
1
+ export declare const PRODUCT_TAIL_PREDICATE_RULES: readonly [{
2
+ readonly pattern: RegExp;
3
+ readonly name: "throttle_policy_rule";
4
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
5
+ readonly rationale: "Throttle-policy prose defines throttling behavior under high-frequency conditions and should be queryable as a predicate.";
6
+ }, {
7
+ readonly pattern: RegExp;
8
+ readonly name: "temporal_order";
9
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
10
+ readonly rationale: "Initializes-after prose defines temporal readiness ordering and should be queryable as a predicate.";
11
+ }, {
12
+ readonly pattern: RegExp;
13
+ readonly name: "state_transition";
14
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
15
+ readonly rationale: "State transitions have source state, target state, and trigger; model them as predicate facts.";
16
+ }, {
17
+ readonly pattern: RegExp;
18
+ readonly name: "permission_rule";
19
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
20
+ readonly rationale: "Prohibitions are negative permission rules and should preserve deny polarity.";
21
+ readonly polarity: "deny";
22
+ }, {
23
+ readonly pattern: RegExp;
24
+ readonly name: "uniqueness_constraint";
25
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
26
+ readonly rationale: "Per-scope uniqueness is relational and should be modeled as a predicate rather than a generic count.";
27
+ }, {
28
+ readonly pattern: RegExp;
29
+ readonly name: "default_value";
30
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
31
+ readonly rationale: "Defaults are relational product behavior and should be explicit ontology predicates.";
32
+ }, {
33
+ readonly pattern: RegExp;
34
+ readonly name: "state_membership";
35
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
36
+ readonly rationale: "State sets are relational workflow constraints and should be queryable as predicate facts.";
37
+ }, {
38
+ readonly pattern: RegExp;
39
+ readonly name: "rate_limit";
40
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
41
+ readonly rationale: "Rate limits are bounded action-window constraints and now map to the production rate_limit predicate.";
42
+ }, {
43
+ readonly pattern: RegExp;
44
+ readonly name: "permission_rule";
45
+ readonly args: (g: Readonly<Record<string, string | undefined>>) => string[];
46
+ readonly rationale: "Actor/action/resource permission prose is better represented as an ontology predicate than a scalar property.";
47
+ }];
48
+ //# sourceMappingURL=predicate-rules-product-tail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predicate-rules-product-tail.d.ts","sourceRoot":"","sources":["../../../src/operations/semantic-advisor/predicate-rules-product-tail.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsHI,CAAC"}
@@ -0,0 +1,102 @@
1
+ import { normalizeKey, normalizePredicateToken, normalizeSubjectKey, singularize, } from "./predicate-rule.js";
2
+ export const PRODUCT_TAIL_PREDICATE_RULES = [
3
+ {
4
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+throttled\s+for\s+(?<condition>.+?)\.?$/i,
5
+ name: "throttle_policy_rule",
6
+ args: (g) => [
7
+ normalizeKey(g.subject ?? ""),
8
+ normalizePredicateToken(g.condition ?? ""),
9
+ ],
10
+ rationale: "Throttle-policy prose defines throttling behavior under high-frequency conditions and should be queryable as a predicate.",
11
+ },
12
+ {
13
+ pattern: /^(?:the\s+)?(?<subject>.+?)\s+initializes\s+after\s+(?:the\s+)?(?<ready>.+?)\s+is\s+ready\.?$/i,
14
+ name: "temporal_order",
15
+ args: (g) => [
16
+ normalizeKey(g.subject ?? ""),
17
+ `${normalizeKey(g.ready ?? "")}_ready`,
18
+ "initializes",
19
+ ],
20
+ rationale: "Initializes-after prose defines temporal readiness ordering and should be queryable as a predicate.",
21
+ },
22
+ {
23
+ pattern: /^when\s+(?<trigger>.+?),\s*(?:the\s+)?(?<subject>[a-z][a-z\s_-]*?)\s+transitions?\s+from\s+(?<from>[a-z][a-z0-9_-]*)\s+to\s+(?<to>[a-z][a-z0-9_-]*)\.?$/i,
24
+ name: "state_transition",
25
+ args: (g) => [
26
+ normalizeSubjectKey(g.subject ?? ""),
27
+ normalizePredicateToken(g.from ?? ""),
28
+ normalizePredicateToken(g.to ?? ""),
29
+ normalizePredicateToken(g.trigger ?? ""),
30
+ ],
31
+ rationale: "State transitions have source state, target state, and trigger; model them as predicate facts.",
32
+ },
33
+ {
34
+ pattern: /^(?<actor>[a-z][a-z\s_-]*?)\s+(?:must\s+not|cannot|can't|is\s+forbidden\s+to)\s+(?<action>[a-z][a-z_-]*)\s+(?<resource>.+?)\.?$/i,
35
+ name: "permission_rule",
36
+ args: (g) => [
37
+ singularize(normalizeKey(g.actor ?? "")),
38
+ normalizePredicateToken(g.action ?? ""),
39
+ normalizePredicateToken(g.resource ?? ""),
40
+ "deny",
41
+ ],
42
+ rationale: "Prohibitions are negative permission rules and should preserve deny polarity.",
43
+ polarity: "deny",
44
+ },
45
+ {
46
+ pattern: /^(?:there\s+)?(?:must|shall|should)\s+be\s+at\s+most\s+one\s+(?<subject>[a-z][a-z\s_-]*?)\s+per\s+(?<scope>.+?)\.?$/i,
47
+ name: "uniqueness_constraint",
48
+ args: (g) => [
49
+ normalizeKey(g.subject ?? ""),
50
+ (g.scope ?? "")
51
+ .split(/\s+per\s+/i)
52
+ .map(normalizePredicateToken)
53
+ .join(","),
54
+ ],
55
+ rationale: "Per-scope uniqueness is relational and should be modeled as a predicate rather than a generic count.",
56
+ },
57
+ {
58
+ pattern: /^(?:the\s+)?(?<subject>[a-z][a-z\s_-]*?)\s+defaults?\s+to\s+(?<value>[a-z][a-z0-9\s_-]*?)(?:\s+(?<property>mode|state|status))?\.?$/i,
59
+ name: "default_value",
60
+ args: (g) => [
61
+ normalizeSubjectKey(g.subject ?? ""),
62
+ normalizeKey(g.property ?? "value"),
63
+ normalizeKey(g.value ?? ""),
64
+ ],
65
+ rationale: "Defaults are relational product behavior and should be explicit ontology predicates.",
66
+ },
67
+ {
68
+ pattern: /^(?<subject>.+?)\s+(?:terminal\s+)?states\s+are\s+(?<states>.+?)\.?$/i,
69
+ name: "state_membership",
70
+ args: (g) => [
71
+ normalizeSubjectKey(g.subject ?? ""),
72
+ (g.states ?? "")
73
+ .split(/,|\band\b|\bor\b/i)
74
+ .map((value) => normalizePredicateToken(value.trim()))
75
+ .filter(Boolean)
76
+ .join(","),
77
+ ],
78
+ rationale: "State sets are relational workflow constraints and should be queryable as predicate facts.",
79
+ },
80
+ {
81
+ pattern: /^(?<subject>.+?)\s+(?:must|shall|should)\s+be\s+rate\s+limited\s+to\s+(?<count>\d+)\s+(?<action>[a-z][a-z\s_-]*?)\s+per\s+(?<window>[a-z]+)\.?$/i,
82
+ name: "rate_limit",
83
+ args: (g) => [
84
+ `${normalizeKey(g.subject ?? "").replace(/_requests?$/, "")}.request`,
85
+ normalizePredicateToken(g.action ?? ""),
86
+ normalizePredicateToken(g.window ?? ""),
87
+ g.count ?? "",
88
+ ],
89
+ rationale: "Rate limits are bounded action-window constraints and now map to the production rate_limit predicate.",
90
+ },
91
+ {
92
+ pattern: /^only\s+(?<actor>[a-z][a-z\s_-]*?)\s+can\s+(?<action>[a-z][a-z_-]*)\s+(?<resource>.+?)(?:\s+when\s+.+)?\.?$/i,
93
+ name: "permission_rule",
94
+ args: (g) => [
95
+ singularize(normalizeKey(g.actor ?? "")),
96
+ normalizeKey(g.action ?? ""),
97
+ normalizeKey(g.resource ?? ""),
98
+ "assert",
99
+ ],
100
+ rationale: "Actor/action/resource permission prose is better represented as an ontology predicate than a scalar property.",
101
+ },
102
+ ];