jev-recipes 0.2.0 → 0.4.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 (437) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/README.md +74 -85
  3. package/dist/catalog/generated/details/action-scope.json +43 -0
  4. package/dist/catalog/generated/details/answer-consistency.json +46 -0
  5. package/dist/catalog/generated/details/answer-coverage.json +66 -0
  6. package/dist/catalog/generated/details/answer-invalidation.json +43 -0
  7. package/dist/catalog/generated/details/answer-relevance.json +45 -0
  8. package/dist/catalog/generated/details/answerability.json +55 -0
  9. package/dist/catalog/generated/details/argument-fit.json +41 -0
  10. package/dist/catalog/generated/details/attempted-step.json +39 -0
  11. package/dist/catalog/generated/details/audience-fit.json +45 -0
  12. package/dist/catalog/generated/details/cache-match.json +41 -0
  13. package/dist/catalog/generated/details/cancellation-check.json +40 -0
  14. package/dist/catalog/generated/details/certainty-match.json +45 -0
  15. package/dist/catalog/generated/details/change-meaning.json +43 -0
  16. package/dist/catalog/generated/details/citation-match.json +64 -0
  17. package/dist/catalog/generated/details/citation-needed.json +39 -0
  18. package/dist/catalog/generated/details/claim-stance.json +55 -0
  19. package/dist/catalog/generated/details/clarify.json +64 -0
  20. package/dist/catalog/generated/details/confirmation-match.json +40 -0
  21. package/dist/catalog/generated/details/constraint-strength.json +48 -0
  22. package/dist/catalog/generated/details/context-role.json +45 -0
  23. package/dist/catalog/generated/details/correction-target.json +68 -0
  24. package/dist/catalog/generated/details/document-role.json +68 -0
  25. package/dist/catalog/generated/details/draft-compare.json +44 -0
  26. package/dist/catalog/generated/details/evidence-conflict.json +46 -0
  27. package/dist/catalog/generated/details/evidence-novelty.json +55 -0
  28. package/dist/catalog/generated/details/fact-stability.json +39 -0
  29. package/dist/catalog/generated/details/failure-kind.json +68 -0
  30. package/dist/catalog/generated/details/feedback-kind.json +69 -0
  31. package/dist/catalog/generated/details/field-select.json +68 -0
  32. package/dist/catalog/generated/details/followup-link.json +68 -0
  33. package/dist/catalog/generated/details/freshness-needed.json +38 -0
  34. package/dist/catalog/generated/details/frustration-signal.json +39 -0
  35. package/dist/catalog/generated/details/handoff.json +75 -0
  36. package/dist/catalog/generated/details/incident-match.json +68 -0
  37. package/dist/catalog/generated/details/instruction-conflict.json +52 -0
  38. package/dist/catalog/generated/details/instruction-fit.json +40 -0
  39. package/dist/catalog/generated/details/intent-change.json +43 -0
  40. package/dist/catalog/generated/details/issue-impact.json +42 -0
  41. package/dist/catalog/generated/details/memory-relation.json +46 -0
  42. package/dist/catalog/generated/details/memory-scope.json +42 -0
  43. package/dist/catalog/generated/details/memory-value.json +46 -0
  44. package/dist/catalog/generated/details/passage-duplicate.json +42 -0
  45. package/dist/catalog/generated/details/preference-kind.json +45 -0
  46. package/dist/catalog/generated/details/promise-check.json +42 -0
  47. package/dist/catalog/generated/details/query-equivalence.json +43 -0
  48. package/dist/catalog/generated/details/query-specificity.json +39 -0
  49. package/dist/catalog/generated/details/reference-resolve.json +69 -0
  50. package/dist/catalog/generated/details/repeated-attempt.json +43 -0
  51. package/dist/catalog/generated/details/reply-template-match.json +68 -0
  52. package/dist/catalog/generated/details/requirement-testability.json +45 -0
  53. package/dist/catalog/generated/details/rerank.json +55 -0
  54. package/dist/catalog/generated/details/resolution-check.json +40 -0
  55. package/dist/catalog/generated/details/response-needed.json +42 -0
  56. package/dist/catalog/generated/details/result-outcome.json +42 -0
  57. package/dist/catalog/generated/details/result-usefulness.json +45 -0
  58. package/dist/catalog/generated/details/retrieval-needed.json +39 -0
  59. package/dist/catalog/generated/details/route.json +51 -0
  60. package/dist/catalog/generated/details/source-applicability.json +39 -0
  61. package/dist/catalog/generated/details/step-complete.json +39 -0
  62. package/dist/catalog/generated/details/step-progress.json +43 -0
  63. package/dist/catalog/generated/details/summary-coverage.json +66 -0
  64. package/dist/catalog/generated/details/task-dependency.json +61 -0
  65. package/dist/catalog/generated/details/task-duplicate.json +49 -0
  66. package/dist/catalog/generated/details/ticket-match.json +43 -0
  67. package/dist/catalog/generated/details/tone-check.json +63 -0
  68. package/dist/catalog/generated/details/tool-fit.json +40 -0
  69. package/dist/catalog/generated/details/topic-shift.json +43 -0
  70. package/dist/catalog/generated/details/troubleshooting-fit.json +40 -0
  71. package/dist/catalog/generated/details/turn-intent.json +69 -0
  72. package/dist/catalog/generated/details/urgency-signal.json +39 -0
  73. package/dist/catalog/generated/details/verify.json +66 -0
  74. package/dist/catalog/generated/details/workaround-fit.json +40 -0
  75. package/dist/catalog/generated/loaders.d.ts +3 -0
  76. package/dist/catalog/generated/loaders.js +74 -0
  77. package/dist/catalog/generated/metadata.d.ts +2 -0
  78. package/dist/catalog/generated/metadata.js +1286 -0
  79. package/dist/catalog/generated/names.d.ts +1 -0
  80. package/dist/catalog/generated/names.js +75 -0
  81. package/dist/catalog/index.d.ts +9 -1764
  82. package/dist/catalog/index.js +8 -24
  83. package/dist/catalog/runner.d.ts +4 -0
  84. package/dist/catalog/runner.js +5 -0
  85. package/dist/catalog/schema.d.ts +57 -50
  86. package/dist/catalog/schema.js +2 -2
  87. package/dist/catalog/search.d.ts +3 -0
  88. package/dist/catalog/search.js +60 -0
  89. package/dist/cli/index.js +17 -8
  90. package/dist/cli/schema.d.ts +169 -167
  91. package/dist/cli/schema.js +37 -4
  92. package/dist/recipes/action-scope/schema.d.ts +3 -3
  93. package/dist/recipes/answer-consistency/schema.d.ts +3 -3
  94. package/dist/recipes/answer-coverage/schema.d.ts +6 -6
  95. package/dist/recipes/answerability/schema.d.ts +6 -6
  96. package/dist/recipes/cancellation-check/schema.d.ts +3 -3
  97. package/dist/recipes/certainty-match/schema.d.ts +3 -3
  98. package/dist/recipes/citation-needed/schema.d.ts +3 -3
  99. package/dist/recipes/claim-stance/demo.json +27 -0
  100. package/dist/recipes/claim-stance/index.d.ts +5 -0
  101. package/dist/recipes/claim-stance/index.js +17 -0
  102. package/dist/recipes/claim-stance/schema.d.ts +43 -0
  103. package/dist/recipes/claim-stance/schema.js +23 -0
  104. package/dist/recipes/clarify/schema.d.ts +3 -3
  105. package/dist/recipes/constraint-strength/demo.json +25 -0
  106. package/dist/recipes/constraint-strength/index.d.ts +5 -0
  107. package/dist/recipes/constraint-strength/index.js +16 -0
  108. package/dist/recipes/constraint-strength/schema.d.ts +39 -0
  109. package/dist/recipes/constraint-strength/schema.js +21 -0
  110. package/dist/recipes/document-role/schema.d.ts +6 -6
  111. package/dist/recipes/evidence-conflict/schema.d.ts +6 -6
  112. package/dist/recipes/feedback-kind/schema.d.ts +3 -3
  113. package/dist/recipes/freshness-needed/schema.d.ts +3 -3
  114. package/dist/recipes/handoff/schema.d.ts +3 -3
  115. package/dist/recipes/instruction-conflict/demo.json +27 -0
  116. package/dist/recipes/instruction-conflict/index.d.ts +5 -0
  117. package/dist/recipes/instruction-conflict/index.js +16 -0
  118. package/dist/recipes/instruction-conflict/schema.d.ts +40 -0
  119. package/dist/recipes/instruction-conflict/schema.js +22 -0
  120. package/dist/recipes/passage-duplicate/schema.d.ts +3 -3
  121. package/dist/recipes/preference-kind/schema.d.ts +6 -6
  122. package/dist/recipes/promise-check/schema.d.ts +3 -3
  123. package/dist/recipes/query-equivalence/schema.d.ts +3 -3
  124. package/dist/recipes/requirement-testability/demo.json +24 -0
  125. package/dist/recipes/requirement-testability/index.d.ts +5 -0
  126. package/dist/recipes/requirement-testability/index.js +15 -0
  127. package/dist/recipes/requirement-testability/schema.d.ts +36 -0
  128. package/dist/recipes/requirement-testability/schema.js +16 -0
  129. package/dist/recipes/result-outcome/schema.d.ts +3 -3
  130. package/dist/recipes/retrieval-needed/schema.d.ts +3 -3
  131. package/dist/recipes/step-progress/schema.d.ts +3 -3
  132. package/dist/recipes/summary-coverage/schema.d.ts +3 -3
  133. package/dist/recipes/task-dependency/demo.json +28 -0
  134. package/dist/recipes/task-dependency/index.d.ts +5 -0
  135. package/dist/recipes/task-dependency/index.js +17 -0
  136. package/dist/recipes/task-dependency/schema.d.ts +43 -0
  137. package/dist/recipes/task-dependency/schema.js +23 -0
  138. package/dist/recipes/task-duplicate/demo.json +27 -0
  139. package/dist/recipes/task-duplicate/index.d.ts +5 -0
  140. package/dist/recipes/task-duplicate/index.js +16 -0
  141. package/dist/recipes/task-duplicate/schema.d.ts +40 -0
  142. package/dist/recipes/task-duplicate/schema.js +22 -0
  143. package/dist/recipes/ticket-match/schema.d.ts +3 -3
  144. package/dist/recipes/topic-shift/schema.d.ts +3 -3
  145. package/dist/recipes/turn-intent/schema.d.ts +12 -12
  146. package/dist/src/index.d.ts +129 -117
  147. package/dist/src/index.js +57 -50
  148. package/dist/src/schema.d.ts +5 -0
  149. package/dist/src/schema.js +2 -0
  150. package/package.json +221 -188
  151. package/dist/catalog/groups/answers.d.ts +0 -565
  152. package/dist/catalog/groups/answers.js +0 -82
  153. package/dist/catalog/groups/conversation.d.ts +0 -608
  154. package/dist/catalog/groups/conversation.js +0 -90
  155. package/dist/catalog/groups/knowledge.d.ts +0 -522
  156. package/dist/catalog/groups/knowledge.js +0 -82
  157. package/dist/catalog/groups/retrieval.d.ts +0 -664
  158. package/dist/catalog/groups/retrieval.js +0 -106
  159. package/dist/catalog/groups/support.d.ts +0 -522
  160. package/dist/catalog/groups/support.js +0 -82
  161. package/dist/catalog/groups/workflow.d.ts +0 -623
  162. package/dist/catalog/groups/workflow.js +0 -98
  163. package/dist/catalog/recipes.d.ts +0 -3488
  164. package/dist/catalog/recipes.js +0 -14
  165. package/dist/examples/support/index.d.ts +0 -1
  166. package/dist/examples/support/index.js +0 -37
  167. package/dist/examples/support/schema.d.ts +0 -566
  168. package/dist/examples/support/schema.js +0 -76
  169. package/dist/examples/support/workflow.d.ts +0 -3
  170. package/dist/examples/support/workflow.js +0 -85
  171. package/dist/recipes/action-scope/metadata.d.ts +0 -8
  172. package/dist/recipes/action-scope/metadata.js +0 -10
  173. package/dist/recipes/answer-consistency/metadata.d.ts +0 -8
  174. package/dist/recipes/answer-consistency/metadata.js +0 -10
  175. package/dist/recipes/answer-coverage/metadata.d.ts +0 -8
  176. package/dist/recipes/answer-coverage/metadata.js +0 -11
  177. package/dist/recipes/answer-invalidation/metadata.d.ts +0 -8
  178. package/dist/recipes/answer-invalidation/metadata.js +0 -10
  179. package/dist/recipes/answer-relevance/metadata.d.ts +0 -8
  180. package/dist/recipes/answer-relevance/metadata.js +0 -10
  181. package/dist/recipes/answerability/metadata.d.ts +0 -8
  182. package/dist/recipes/answerability/metadata.js +0 -11
  183. package/dist/recipes/argument-fit/metadata.d.ts +0 -8
  184. package/dist/recipes/argument-fit/metadata.js +0 -10
  185. package/dist/recipes/attempted-step/metadata.d.ts +0 -8
  186. package/dist/recipes/attempted-step/metadata.js +0 -10
  187. package/dist/recipes/audience-fit/metadata.d.ts +0 -8
  188. package/dist/recipes/audience-fit/metadata.js +0 -10
  189. package/dist/recipes/cache-match/metadata.d.ts +0 -8
  190. package/dist/recipes/cache-match/metadata.js +0 -10
  191. package/dist/recipes/cancellation-check/metadata.d.ts +0 -8
  192. package/dist/recipes/cancellation-check/metadata.js +0 -10
  193. package/dist/recipes/certainty-match/metadata.d.ts +0 -8
  194. package/dist/recipes/certainty-match/metadata.js +0 -10
  195. package/dist/recipes/change-meaning/metadata.d.ts +0 -8
  196. package/dist/recipes/change-meaning/metadata.js +0 -10
  197. package/dist/recipes/citation-match/metadata.d.ts +0 -9
  198. package/dist/recipes/citation-match/metadata.js +0 -12
  199. package/dist/recipes/citation-needed/metadata.d.ts +0 -8
  200. package/dist/recipes/citation-needed/metadata.js +0 -10
  201. package/dist/recipes/clarify/metadata.d.ts +0 -8
  202. package/dist/recipes/clarify/metadata.js +0 -11
  203. package/dist/recipes/confirmation-match/metadata.d.ts +0 -8
  204. package/dist/recipes/confirmation-match/metadata.js +0 -10
  205. package/dist/recipes/context-role/metadata.d.ts +0 -8
  206. package/dist/recipes/context-role/metadata.js +0 -10
  207. package/dist/recipes/correction-target/metadata.d.ts +0 -8
  208. package/dist/recipes/correction-target/metadata.js +0 -11
  209. package/dist/recipes/document-role/metadata.d.ts +0 -8
  210. package/dist/recipes/document-role/metadata.js +0 -10
  211. package/dist/recipes/draft-compare/metadata.d.ts +0 -8
  212. package/dist/recipes/draft-compare/metadata.js +0 -10
  213. package/dist/recipes/evidence-conflict/metadata.d.ts +0 -8
  214. package/dist/recipes/evidence-conflict/metadata.js +0 -10
  215. package/dist/recipes/evidence-novelty/metadata.d.ts +0 -8
  216. package/dist/recipes/evidence-novelty/metadata.js +0 -11
  217. package/dist/recipes/fact-stability/metadata.d.ts +0 -8
  218. package/dist/recipes/fact-stability/metadata.js +0 -10
  219. package/dist/recipes/failure-kind/metadata.d.ts +0 -8
  220. package/dist/recipes/failure-kind/metadata.js +0 -11
  221. package/dist/recipes/feedback-kind/metadata.d.ts +0 -8
  222. package/dist/recipes/feedback-kind/metadata.js +0 -10
  223. package/dist/recipes/field-select/metadata.d.ts +0 -8
  224. package/dist/recipes/field-select/metadata.js +0 -11
  225. package/dist/recipes/followup-link/metadata.d.ts +0 -8
  226. package/dist/recipes/followup-link/metadata.js +0 -11
  227. package/dist/recipes/freshness-needed/metadata.d.ts +0 -8
  228. package/dist/recipes/freshness-needed/metadata.js +0 -10
  229. package/dist/recipes/frustration-signal/metadata.d.ts +0 -8
  230. package/dist/recipes/frustration-signal/metadata.js +0 -10
  231. package/dist/recipes/handoff/metadata.d.ts +0 -8
  232. package/dist/recipes/handoff/metadata.js +0 -11
  233. package/dist/recipes/incident-match/metadata.d.ts +0 -8
  234. package/dist/recipes/incident-match/metadata.js +0 -11
  235. package/dist/recipes/instruction-fit/metadata.d.ts +0 -8
  236. package/dist/recipes/instruction-fit/metadata.js +0 -10
  237. package/dist/recipes/intent-change/metadata.d.ts +0 -8
  238. package/dist/recipes/intent-change/metadata.js +0 -10
  239. package/dist/recipes/issue-impact/metadata.d.ts +0 -8
  240. package/dist/recipes/issue-impact/metadata.js +0 -10
  241. package/dist/recipes/memory-relation/metadata.d.ts +0 -8
  242. package/dist/recipes/memory-relation/metadata.js +0 -10
  243. package/dist/recipes/memory-scope/metadata.d.ts +0 -8
  244. package/dist/recipes/memory-scope/metadata.js +0 -10
  245. package/dist/recipes/memory-value/metadata.d.ts +0 -8
  246. package/dist/recipes/memory-value/metadata.js +0 -10
  247. package/dist/recipes/passage-duplicate/metadata.d.ts +0 -8
  248. package/dist/recipes/passage-duplicate/metadata.js +0 -10
  249. package/dist/recipes/preference-kind/metadata.d.ts +0 -8
  250. package/dist/recipes/preference-kind/metadata.js +0 -10
  251. package/dist/recipes/promise-check/metadata.d.ts +0 -8
  252. package/dist/recipes/promise-check/metadata.js +0 -10
  253. package/dist/recipes/query-equivalence/metadata.d.ts +0 -8
  254. package/dist/recipes/query-equivalence/metadata.js +0 -10
  255. package/dist/recipes/query-specificity/metadata.d.ts +0 -8
  256. package/dist/recipes/query-specificity/metadata.js +0 -10
  257. package/dist/recipes/reference-resolve/metadata.d.ts +0 -8
  258. package/dist/recipes/reference-resolve/metadata.js +0 -11
  259. package/dist/recipes/repeated-attempt/metadata.d.ts +0 -8
  260. package/dist/recipes/repeated-attempt/metadata.js +0 -10
  261. package/dist/recipes/reply-template-match/metadata.d.ts +0 -8
  262. package/dist/recipes/reply-template-match/metadata.js +0 -11
  263. package/dist/recipes/rerank/metadata.d.ts +0 -8
  264. package/dist/recipes/rerank/metadata.js +0 -11
  265. package/dist/recipes/resolution-check/metadata.d.ts +0 -8
  266. package/dist/recipes/resolution-check/metadata.js +0 -10
  267. package/dist/recipes/response-needed/metadata.d.ts +0 -8
  268. package/dist/recipes/response-needed/metadata.js +0 -10
  269. package/dist/recipes/result-outcome/metadata.d.ts +0 -8
  270. package/dist/recipes/result-outcome/metadata.js +0 -10
  271. package/dist/recipes/result-usefulness/metadata.d.ts +0 -8
  272. package/dist/recipes/result-usefulness/metadata.js +0 -10
  273. package/dist/recipes/retrieval-needed/metadata.d.ts +0 -8
  274. package/dist/recipes/retrieval-needed/metadata.js +0 -10
  275. package/dist/recipes/route/metadata.d.ts +0 -8
  276. package/dist/recipes/route/metadata.js +0 -11
  277. package/dist/recipes/source-applicability/metadata.d.ts +0 -8
  278. package/dist/recipes/source-applicability/metadata.js +0 -10
  279. package/dist/recipes/step-complete/metadata.d.ts +0 -8
  280. package/dist/recipes/step-complete/metadata.js +0 -10
  281. package/dist/recipes/step-progress/metadata.d.ts +0 -8
  282. package/dist/recipes/step-progress/metadata.js +0 -10
  283. package/dist/recipes/summary-coverage/metadata.d.ts +0 -8
  284. package/dist/recipes/summary-coverage/metadata.js +0 -11
  285. package/dist/recipes/ticket-match/metadata.d.ts +0 -8
  286. package/dist/recipes/ticket-match/metadata.js +0 -10
  287. package/dist/recipes/tone-check/metadata.d.ts +0 -8
  288. package/dist/recipes/tone-check/metadata.js +0 -11
  289. package/dist/recipes/tool-fit/metadata.d.ts +0 -8
  290. package/dist/recipes/tool-fit/metadata.js +0 -10
  291. package/dist/recipes/topic-shift/metadata.d.ts +0 -8
  292. package/dist/recipes/topic-shift/metadata.js +0 -10
  293. package/dist/recipes/troubleshooting-fit/metadata.d.ts +0 -8
  294. package/dist/recipes/troubleshooting-fit/metadata.js +0 -10
  295. package/dist/recipes/turn-intent/metadata.d.ts +0 -8
  296. package/dist/recipes/turn-intent/metadata.js +0 -10
  297. package/dist/recipes/urgency-signal/metadata.d.ts +0 -8
  298. package/dist/recipes/urgency-signal/metadata.js +0 -10
  299. package/dist/recipes/verify/metadata.d.ts +0 -8
  300. package/dist/recipes/verify/metadata.js +0 -11
  301. package/dist/recipes/workaround-fit/metadata.d.ts +0 -8
  302. package/dist/recipes/workaround-fit/metadata.js +0 -10
  303. package/examples/support/README.md +0 -60
  304. package/examples/support/demo.json +0 -156
  305. package/recipes/README.md +0 -128
  306. package/recipes/action-scope/README.md +0 -49
  307. package/recipes/answer-consistency/README.md +0 -50
  308. package/recipes/answer-coverage/README.md +0 -60
  309. package/recipes/answer-invalidation/README.md +0 -50
  310. package/recipes/answer-relevance/README.md +0 -49
  311. package/recipes/answerability/README.md +0 -54
  312. package/recipes/argument-fit/README.md +0 -51
  313. package/recipes/attempted-step/README.md +0 -48
  314. package/recipes/audience-fit/README.md +0 -50
  315. package/recipes/cache-match/README.md +0 -51
  316. package/recipes/cancellation-check/README.md +0 -50
  317. package/recipes/certainty-match/README.md +0 -49
  318. package/recipes/change-meaning/README.md +0 -49
  319. package/recipes/citation-match/README.md +0 -51
  320. package/recipes/citation-needed/README.md +0 -49
  321. package/recipes/clarify/README.md +0 -61
  322. package/recipes/confirmation-match/README.md +0 -49
  323. package/recipes/context-role/README.md +0 -49
  324. package/recipes/correction-target/README.md +0 -52
  325. package/recipes/document-role/README.md +0 -51
  326. package/recipes/draft-compare/README.md +0 -54
  327. package/recipes/evidence-conflict/README.md +0 -51
  328. package/recipes/evidence-novelty/README.md +0 -56
  329. package/recipes/fact-stability/README.md +0 -47
  330. package/recipes/failure-kind/README.md +0 -52
  331. package/recipes/feedback-kind/README.md +0 -51
  332. package/recipes/field-select/README.md +0 -53
  333. package/recipes/followup-link/README.md +0 -52
  334. package/recipes/freshness-needed/README.md +0 -46
  335. package/recipes/frustration-signal/README.md +0 -47
  336. package/recipes/handoff/README.md +0 -56
  337. package/recipes/incident-match/README.md +0 -52
  338. package/recipes/instruction-fit/README.md +0 -49
  339. package/recipes/intent-change/README.md +0 -50
  340. package/recipes/issue-impact/README.md +0 -48
  341. package/recipes/memory-relation/README.md +0 -52
  342. package/recipes/memory-scope/README.md +0 -50
  343. package/recipes/memory-value/README.md +0 -50
  344. package/recipes/passage-duplicate/README.md +0 -49
  345. package/recipes/preference-kind/README.md +0 -48
  346. package/recipes/promise-check/README.md +0 -48
  347. package/recipes/query-equivalence/README.md +0 -50
  348. package/recipes/query-specificity/README.md +0 -47
  349. package/recipes/reference-resolve/README.md +0 -54
  350. package/recipes/repeated-attempt/README.md +0 -50
  351. package/recipes/reply-template-match/README.md +0 -52
  352. package/recipes/rerank/README.md +0 -55
  353. package/recipes/resolution-check/README.md +0 -49
  354. package/recipes/response-needed/README.md +0 -48
  355. package/recipes/result-outcome/README.md +0 -49
  356. package/recipes/result-usefulness/README.md +0 -49
  357. package/recipes/retrieval-needed/README.md +0 -48
  358. package/recipes/route/README.md +0 -47
  359. package/recipes/source-applicability/README.md +0 -48
  360. package/recipes/step-complete/README.md +0 -48
  361. package/recipes/step-progress/README.md +0 -51
  362. package/recipes/summary-coverage/README.md +0 -60
  363. package/recipes/ticket-match/README.md +0 -50
  364. package/recipes/tone-check/README.md +0 -55
  365. package/recipes/tool-fit/README.md +0 -49
  366. package/recipes/topic-shift/README.md +0 -50
  367. package/recipes/troubleshooting-fit/README.md +0 -49
  368. package/recipes/turn-intent/README.md +0 -52
  369. package/recipes/urgency-signal/README.md +0 -47
  370. package/recipes/verify/README.md +0 -54
  371. package/recipes/workaround-fit/README.md +0 -50
  372. /package/{recipes → dist/recipes}/action-scope/demo.json +0 -0
  373. /package/{recipes → dist/recipes}/answer-consistency/demo.json +0 -0
  374. /package/{recipes → dist/recipes}/answer-coverage/demo.json +0 -0
  375. /package/{recipes → dist/recipes}/answer-invalidation/demo.json +0 -0
  376. /package/{recipes → dist/recipes}/answer-relevance/demo.json +0 -0
  377. /package/{recipes → dist/recipes}/answerability/demo.json +0 -0
  378. /package/{recipes → dist/recipes}/argument-fit/demo.json +0 -0
  379. /package/{recipes → dist/recipes}/attempted-step/demo.json +0 -0
  380. /package/{recipes → dist/recipes}/audience-fit/demo.json +0 -0
  381. /package/{recipes → dist/recipes}/cache-match/demo.json +0 -0
  382. /package/{recipes → dist/recipes}/cancellation-check/demo.json +0 -0
  383. /package/{recipes → dist/recipes}/certainty-match/demo.json +0 -0
  384. /package/{recipes → dist/recipes}/change-meaning/demo.json +0 -0
  385. /package/{recipes → dist/recipes}/citation-match/demo.json +0 -0
  386. /package/{recipes → dist/recipes}/citation-needed/demo.json +0 -0
  387. /package/{recipes → dist/recipes}/clarify/demo.json +0 -0
  388. /package/{recipes → dist/recipes}/confirmation-match/demo.json +0 -0
  389. /package/{recipes → dist/recipes}/context-role/demo.json +0 -0
  390. /package/{recipes → dist/recipes}/correction-target/demo.json +0 -0
  391. /package/{recipes → dist/recipes}/document-role/demo.json +0 -0
  392. /package/{recipes → dist/recipes}/draft-compare/demo.json +0 -0
  393. /package/{recipes → dist/recipes}/evidence-conflict/demo.json +0 -0
  394. /package/{recipes → dist/recipes}/evidence-novelty/demo.json +0 -0
  395. /package/{recipes → dist/recipes}/fact-stability/demo.json +0 -0
  396. /package/{recipes → dist/recipes}/failure-kind/demo.json +0 -0
  397. /package/{recipes → dist/recipes}/feedback-kind/demo.json +0 -0
  398. /package/{recipes → dist/recipes}/field-select/demo.json +0 -0
  399. /package/{recipes → dist/recipes}/followup-link/demo.json +0 -0
  400. /package/{recipes → dist/recipes}/freshness-needed/demo.json +0 -0
  401. /package/{recipes → dist/recipes}/frustration-signal/demo.json +0 -0
  402. /package/{recipes → dist/recipes}/handoff/demo.json +0 -0
  403. /package/{recipes → dist/recipes}/incident-match/demo.json +0 -0
  404. /package/{recipes → dist/recipes}/instruction-fit/demo.json +0 -0
  405. /package/{recipes → dist/recipes}/intent-change/demo.json +0 -0
  406. /package/{recipes → dist/recipes}/issue-impact/demo.json +0 -0
  407. /package/{recipes → dist/recipes}/memory-relation/demo.json +0 -0
  408. /package/{recipes → dist/recipes}/memory-scope/demo.json +0 -0
  409. /package/{recipes → dist/recipes}/memory-value/demo.json +0 -0
  410. /package/{recipes → dist/recipes}/passage-duplicate/demo.json +0 -0
  411. /package/{recipes → dist/recipes}/preference-kind/demo.json +0 -0
  412. /package/{recipes → dist/recipes}/promise-check/demo.json +0 -0
  413. /package/{recipes → dist/recipes}/query-equivalence/demo.json +0 -0
  414. /package/{recipes → dist/recipes}/query-specificity/demo.json +0 -0
  415. /package/{recipes → dist/recipes}/reference-resolve/demo.json +0 -0
  416. /package/{recipes → dist/recipes}/repeated-attempt/demo.json +0 -0
  417. /package/{recipes → dist/recipes}/reply-template-match/demo.json +0 -0
  418. /package/{recipes → dist/recipes}/rerank/demo.json +0 -0
  419. /package/{recipes → dist/recipes}/resolution-check/demo.json +0 -0
  420. /package/{recipes → dist/recipes}/response-needed/demo.json +0 -0
  421. /package/{recipes → dist/recipes}/result-outcome/demo.json +0 -0
  422. /package/{recipes → dist/recipes}/result-usefulness/demo.json +0 -0
  423. /package/{recipes → dist/recipes}/retrieval-needed/demo.json +0 -0
  424. /package/{recipes → dist/recipes}/route/demo.json +0 -0
  425. /package/{recipes → dist/recipes}/source-applicability/demo.json +0 -0
  426. /package/{recipes → dist/recipes}/step-complete/demo.json +0 -0
  427. /package/{recipes → dist/recipes}/step-progress/demo.json +0 -0
  428. /package/{recipes → dist/recipes}/summary-coverage/demo.json +0 -0
  429. /package/{recipes → dist/recipes}/ticket-match/demo.json +0 -0
  430. /package/{recipes → dist/recipes}/tone-check/demo.json +0 -0
  431. /package/{recipes → dist/recipes}/tool-fit/demo.json +0 -0
  432. /package/{recipes → dist/recipes}/topic-shift/demo.json +0 -0
  433. /package/{recipes → dist/recipes}/troubleshooting-fit/demo.json +0 -0
  434. /package/{recipes → dist/recipes}/turn-intent/demo.json +0 -0
  435. /package/{recipes → dist/recipes}/urgency-signal/demo.json +0 -0
  436. /package/{recipes → dist/recipes}/verify/demo.json +0 -0
  437. /package/{recipes → dist/recipes}/workaround-fit/demo.json +0 -0
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const citationNeededVerdictSchema: z.ZodEnum<{
3
- unclear: "unclear";
4
3
  needed: "needed";
4
+ unclear: "unclear";
5
5
  unnecessary: "unnecessary";
6
6
  }>;
7
7
  export declare const citationNeededInputSchema: z.ZodObject<{
@@ -20,14 +20,14 @@ export declare const citationNeededResultSchema: z.ZodObject<{
20
20
  review: "review";
21
21
  }>;
22
22
  verdict: z.ZodEnum<{
23
- unclear: "unclear";
24
23
  needed: "needed";
24
+ unclear: "unclear";
25
25
  unnecessary: "unnecessary";
26
26
  }>;
27
27
  confidence: z.ZodNumber;
28
28
  probabilities: z.ZodRecord<z.ZodEnum<{
29
- unclear: "unclear";
30
29
  needed: "needed";
30
+ unclear: "unclear";
31
31
  unnecessary: "unnecessary";
32
32
  }>, z.ZodNumber>;
33
33
  }, z.core.$strip>;
@@ -0,0 +1,27 @@
1
+ {
2
+ "input": {
3
+ "claim": "The report says all tests passed.",
4
+ "response": "No. The report lists two failing tests."
5
+ },
6
+ "response": {
7
+ "model": "demo-fixture",
8
+ "usage": {
9
+ "input_tokens": 0,
10
+ "output_tokens": 0
11
+ },
12
+ "answers": {
13
+ "decision": {
14
+ "type": "choice",
15
+ "choice": "denies",
16
+ "confidence": 0.96,
17
+ "probabilities": {
18
+ "affirms": 0.01,
19
+ "denies": 0.96,
20
+ "mixed": 0.01,
21
+ "not_addressed": 0.01,
22
+ "unclear": 0.01
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,5 @@
1
+ import type { RecipeOptions } from '../../src/schema.js';
2
+ import type { ClaimStanceInput, ClaimStanceResult } from './schema.js';
3
+ export declare function claimStance(input: ClaimStanceInput, options?: RecipeOptions): Promise<ClaimStanceResult>;
4
+ export { claimStanceInputSchema, claimStanceResultSchema, claimStanceVerdictSchema, } from './schema.js';
5
+ export type { ClaimStanceInput, ClaimStanceResult, ClaimStanceVerdict } from './schema.js';
@@ -0,0 +1,17 @@
1
+ import { evaluateChoice } from '../../src/decisions.js';
2
+ import { claimStanceInputSchema, claimStanceResultSchema } from './schema.js';
3
+ export async function claimStance(input, options = {}) {
4
+ const { minConfidence = 0.8, ...state } = claimStanceInputSchema.parse(input);
5
+ const decision = await evaluateChoice(state, "What position does response itself express toward claim, interpreted using context? Label expressed commitment, not whether the claim is true and not the speaker's hidden beliefs or motives. Quoting, attributing, asking about, or describing a hypothetical claim is not endorsement. Polite acknowledgment of a person is not agreement with the claim. Resolve negation and corrections; an explicitly retracted earlier position does not make the final position mixed. Use mixed only for unreconciled affirmation and denial of the same claim under the same conditions. Expressed uncertainty about the claim is unclear, not not_addressed. Do not turn this label into a judgment of sycophancy or deception.", {
6
+ affirms: 'The response commits to the supplied claim being true, without an unreconciled denial.',
7
+ denies: 'The response commits to the supplied claim being false, without an unreconciled affirmation.',
8
+ mixed: 'The response both affirms and denies the same claim under the same conditions without resolving the conflict.',
9
+ not_addressed: 'The response expresses no position on the claim; a mere quotation, attributed statement, or acknowledgment is not a position.',
10
+ unclear: 'The response expresses uncertainty or its wording and references do not resolve its position.',
11
+ }, options);
12
+ return claimStanceResultSchema.parse({
13
+ ...decision,
14
+ status: decision.confidence < minConfidence || decision.verdict === 'unclear' ? 'review' : 'ready',
15
+ });
16
+ }
17
+ export { claimStanceInputSchema, claimStanceResultSchema, claimStanceVerdictSchema, } from './schema.js';
@@ -0,0 +1,43 @@
1
+ import { z } from 'zod';
2
+ export declare const claimStanceVerdictSchema: z.ZodEnum<{
3
+ unclear: "unclear";
4
+ affirms: "affirms";
5
+ denies: "denies";
6
+ mixed: "mixed";
7
+ not_addressed: "not_addressed";
8
+ }>;
9
+ export declare const claimStanceInputSchema: z.ZodObject<{
10
+ claim: z.ZodString;
11
+ response: z.ZodString;
12
+ context: z.ZodOptional<z.ZodString>;
13
+ minConfidence: z.ZodOptional<z.ZodNumber>;
14
+ }, z.core.$strip>;
15
+ export declare const claimStanceResultSchema: z.ZodObject<{
16
+ model: z.ZodString;
17
+ usage: z.ZodObject<{
18
+ input_tokens: z.ZodNumber;
19
+ output_tokens: z.ZodNumber;
20
+ }, z.core.$strip>;
21
+ status: z.ZodEnum<{
22
+ ready: "ready";
23
+ review: "review";
24
+ }>;
25
+ verdict: z.ZodEnum<{
26
+ unclear: "unclear";
27
+ affirms: "affirms";
28
+ denies: "denies";
29
+ mixed: "mixed";
30
+ not_addressed: "not_addressed";
31
+ }>;
32
+ confidence: z.ZodNumber;
33
+ probabilities: z.ZodRecord<z.ZodEnum<{
34
+ unclear: "unclear";
35
+ affirms: "affirms";
36
+ denies: "denies";
37
+ mixed: "mixed";
38
+ not_addressed: "not_addressed";
39
+ }>, z.ZodNumber>;
40
+ }, z.core.$strip>;
41
+ export type ClaimStanceInput = z.infer<typeof claimStanceInputSchema>;
42
+ export type ClaimStanceResult = z.infer<typeof claimStanceResultSchema>;
43
+ export type ClaimStanceVerdict = z.infer<typeof claimStanceVerdictSchema>;
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ import { decisionStatusSchema, nonEmptyText, probability, resultMetadataSchema, } from '../../src/schema.js';
3
+ export const claimStanceVerdictSchema = z.enum([
4
+ 'affirms',
5
+ 'denies',
6
+ 'mixed',
7
+ 'not_addressed',
8
+ 'unclear',
9
+ ]);
10
+ export const claimStanceInputSchema = z.object({
11
+ claim: nonEmptyText.describe('One proposition whose stance should be labeled; its truth is evaluated separately.'),
12
+ response: nonEmptyText.describe('The response whose expressed position should be labeled.'),
13
+ context: nonEmptyText
14
+ .describe('Supplied context needed to resolve references in the response.')
15
+ .optional(),
16
+ minConfidence: probability.optional(),
17
+ });
18
+ export const claimStanceResultSchema = resultMetadataSchema.extend({
19
+ status: decisionStatusSchema,
20
+ verdict: claimStanceVerdictSchema,
21
+ confidence: probability,
22
+ probabilities: z.record(claimStanceVerdictSchema, probability),
23
+ });
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  export declare const requirementVerdictSchema: z.ZodEnum<{
3
3
  ambiguous: "ambiguous";
4
- present: "present";
5
4
  missing: "missing";
5
+ present: "present";
6
6
  }>;
7
7
  export declare const clarifyRequirementSchema: z.ZodObject<{
8
8
  id: z.ZodString;
@@ -38,14 +38,14 @@ export declare const clarifyResultSchema: z.ZodObject<{
38
38
  }>;
39
39
  verdict: z.ZodEnum<{
40
40
  ambiguous: "ambiguous";
41
- present: "present";
42
41
  missing: "missing";
42
+ present: "present";
43
43
  }>;
44
44
  confidence: z.ZodNumber;
45
45
  probabilities: z.ZodRecord<z.ZodEnum<{
46
46
  ambiguous: "ambiguous";
47
- present: "present";
48
47
  missing: "missing";
48
+ present: "present";
49
49
  }>, z.ZodNumber>;
50
50
  }, z.core.$strip>>;
51
51
  }, z.core.$strip>;
@@ -0,0 +1,25 @@
1
+ {
2
+ "input": {
3
+ "statement": "Prefer a CSV export, but JSON is fine if that is easier."
4
+ },
5
+ "response": {
6
+ "model": "demo-fixture",
7
+ "usage": {
8
+ "input_tokens": 0,
9
+ "output_tokens": 0
10
+ },
11
+ "answers": {
12
+ "decision": {
13
+ "type": "choice",
14
+ "choice": "preferred",
15
+ "confidence": 0.96,
16
+ "probabilities": {
17
+ "required": 0.013333333333333334,
18
+ "preferred": 0.96,
19
+ "optional": 0.013333333333333334,
20
+ "unclear": 0.013333333333333334
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,5 @@
1
+ import type { RecipeOptions } from '../../src/schema.js';
2
+ import type { ConstraintStrengthInput, ConstraintStrengthResult } from './schema.js';
3
+ export declare function constraintStrength(input: ConstraintStrengthInput, options?: RecipeOptions): Promise<ConstraintStrengthResult>;
4
+ export { constraintStrengthInputSchema, constraintStrengthResultSchema, constraintStrengthVerdictSchema, } from './schema.js';
5
+ export type { ConstraintStrengthInput, ConstraintStrengthResult, ConstraintStrengthVerdict, } from './schema.js';
@@ -0,0 +1,16 @@
1
+ import { evaluateChoice } from '../../src/decisions.js';
2
+ import { constraintStrengthInputSchema, constraintStrengthResultSchema } from './schema.js';
3
+ export async function constraintStrength(input, options = {}) {
4
+ const { minConfidence = 0.8, ...state } = constraintStrengthInputSchema.parse(input);
5
+ const decision = await evaluateChoice(state, 'How binding is the single constraint expressed by statement in context? Interpret the expressed wording and qualifications, not hidden intent or keyword matches alone. A prohibition can be required. A stated preference is preferred when alternatives remain acceptable; optional requires explicit discretion with no stated preference. A condition describes when a constraint applies and does not by itself make the constraint optional. Do not infer authority, permission, consent, or a lasting user preference. Choose unclear for unresolved mixed constraints, hypothetical wording, or text that does not establish a constraint.', {
6
+ required: 'The statement presents an obligation or prohibition that must be met whenever its stated condition applies.',
7
+ preferred: 'The statement favors an outcome but explicitly or unambiguously allows alternatives.',
8
+ optional: 'The statement explicitly leaves the choice open without favoring an outcome.',
9
+ unclear: 'The wording or context does not establish one constraint with a clear level of obligation.',
10
+ }, options);
11
+ return constraintStrengthResultSchema.parse({
12
+ ...decision,
13
+ status: decision.confidence < minConfidence || decision.verdict === 'unclear' ? 'review' : 'ready',
14
+ });
15
+ }
16
+ export { constraintStrengthInputSchema, constraintStrengthResultSchema, constraintStrengthVerdictSchema, } from './schema.js';
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+ export declare const constraintStrengthVerdictSchema: z.ZodEnum<{
3
+ optional: "optional";
4
+ unclear: "unclear";
5
+ required: "required";
6
+ preferred: "preferred";
7
+ }>;
8
+ export declare const constraintStrengthInputSchema: z.ZodObject<{
9
+ statement: z.ZodString;
10
+ context: z.ZodOptional<z.ZodString>;
11
+ minConfidence: z.ZodOptional<z.ZodNumber>;
12
+ }, z.core.$strip>;
13
+ export declare const constraintStrengthResultSchema: z.ZodObject<{
14
+ model: z.ZodString;
15
+ usage: z.ZodObject<{
16
+ input_tokens: z.ZodNumber;
17
+ output_tokens: z.ZodNumber;
18
+ }, z.core.$strip>;
19
+ status: z.ZodEnum<{
20
+ ready: "ready";
21
+ review: "review";
22
+ }>;
23
+ verdict: z.ZodEnum<{
24
+ optional: "optional";
25
+ unclear: "unclear";
26
+ required: "required";
27
+ preferred: "preferred";
28
+ }>;
29
+ confidence: z.ZodNumber;
30
+ probabilities: z.ZodRecord<z.ZodEnum<{
31
+ optional: "optional";
32
+ unclear: "unclear";
33
+ required: "required";
34
+ preferred: "preferred";
35
+ }>, z.ZodNumber>;
36
+ }, z.core.$strip>;
37
+ export type ConstraintStrengthInput = z.infer<typeof constraintStrengthInputSchema>;
38
+ export type ConstraintStrengthResult = z.infer<typeof constraintStrengthResultSchema>;
39
+ export type ConstraintStrengthVerdict = z.infer<typeof constraintStrengthVerdictSchema>;
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ import { decisionStatusSchema, nonEmptyText, probability, resultMetadataSchema, } from '../../src/schema.js';
3
+ export const constraintStrengthVerdictSchema = z.enum([
4
+ 'required',
5
+ 'preferred',
6
+ 'optional',
7
+ 'unclear',
8
+ ]);
9
+ export const constraintStrengthInputSchema = z.object({
10
+ statement: nonEmptyText.describe('One constraint or preference to interpret.'),
11
+ context: nonEmptyText
12
+ .describe('The surrounding request and any qualifications that clarify its force.')
13
+ .optional(),
14
+ minConfidence: probability.optional(),
15
+ });
16
+ export const constraintStrengthResultSchema = resultMetadataSchema.extend({
17
+ status: decisionStatusSchema,
18
+ verdict: constraintStrengthVerdictSchema,
19
+ confidence: probability,
20
+ probabilities: z.record(constraintStrengthVerdictSchema, probability),
21
+ });
@@ -1,12 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  export declare const documentRoleVerdictSchema: z.ZodEnum<{
3
- unclear: "unclear";
4
- other: "other";
5
3
  reference: "reference";
6
4
  troubleshooting: "troubleshooting";
5
+ unclear: "unclear";
7
6
  policy: "policy";
8
7
  tutorial: "tutorial";
9
8
  release_note: "release_note";
9
+ other: "other";
10
10
  }>;
11
11
  export declare const documentRoleInputSchema: z.ZodObject<{
12
12
  document: z.ZodString;
@@ -23,23 +23,23 @@ export declare const documentRoleResultSchema: z.ZodObject<{
23
23
  review: "review";
24
24
  }>;
25
25
  verdict: z.ZodEnum<{
26
- unclear: "unclear";
27
- other: "other";
28
26
  reference: "reference";
29
27
  troubleshooting: "troubleshooting";
28
+ unclear: "unclear";
30
29
  policy: "policy";
31
30
  tutorial: "tutorial";
32
31
  release_note: "release_note";
32
+ other: "other";
33
33
  }>;
34
34
  confidence: z.ZodNumber;
35
35
  probabilities: z.ZodRecord<z.ZodEnum<{
36
- unclear: "unclear";
37
- other: "other";
38
36
  reference: "reference";
39
37
  troubleshooting: "troubleshooting";
38
+ unclear: "unclear";
40
39
  policy: "policy";
41
40
  tutorial: "tutorial";
42
41
  release_note: "release_note";
42
+ other: "other";
43
43
  }>, z.ZodNumber>;
44
44
  }, z.core.$strip>;
45
45
  export type DocumentRoleInput = z.infer<typeof documentRoleInputSchema>;
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  export declare const evidenceConflictVerdictSchema: z.ZodEnum<{
3
- conflicting: "conflicting";
4
- unclear: "unclear";
5
3
  compatible: "compatible";
4
+ unclear: "unclear";
5
+ conflicting: "conflicting";
6
6
  different_scope: "different_scope";
7
7
  }>;
8
8
  export declare const evidenceConflictInputSchema: z.ZodObject<{
@@ -22,16 +22,16 @@ export declare const evidenceConflictResultSchema: z.ZodObject<{
22
22
  review: "review";
23
23
  }>;
24
24
  verdict: z.ZodEnum<{
25
- conflicting: "conflicting";
26
- unclear: "unclear";
27
25
  compatible: "compatible";
26
+ unclear: "unclear";
27
+ conflicting: "conflicting";
28
28
  different_scope: "different_scope";
29
29
  }>;
30
30
  confidence: z.ZodNumber;
31
31
  probabilities: z.ZodRecord<z.ZodEnum<{
32
- conflicting: "conflicting";
33
- unclear: "unclear";
34
32
  compatible: "compatible";
33
+ unclear: "unclear";
34
+ conflicting: "conflicting";
35
35
  different_scope: "different_scope";
36
36
  }>, z.ZodNumber>;
37
37
  }, z.core.$strip>;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const feedbackKindVerdictSchema: z.ZodEnum<{
3
- question: "question";
4
3
  unclear: "unclear";
4
+ question: "question";
5
5
  other: "other";
6
6
  bug_report: "bug_report";
7
7
  feature_request: "feature_request";
@@ -24,8 +24,8 @@ export declare const feedbackKindResultSchema: z.ZodObject<{
24
24
  review: "review";
25
25
  }>;
26
26
  verdict: z.ZodEnum<{
27
- question: "question";
28
27
  unclear: "unclear";
28
+ question: "question";
29
29
  other: "other";
30
30
  bug_report: "bug_report";
31
31
  feature_request: "feature_request";
@@ -34,8 +34,8 @@ export declare const feedbackKindResultSchema: z.ZodObject<{
34
34
  }>;
35
35
  confidence: z.ZodNumber;
36
36
  probabilities: z.ZodRecord<z.ZodEnum<{
37
- question: "question";
38
37
  unclear: "unclear";
38
+ question: "question";
39
39
  other: "other";
40
40
  bug_report: "bug_report";
41
41
  feature_request: "feature_request";
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  export declare const freshnessNeededVerdictSchema: z.ZodEnum<{
3
3
  unclear: "unclear";
4
- current: "current";
5
4
  stable: "stable";
5
+ current: "current";
6
6
  }>;
7
7
  export declare const freshnessNeededInputSchema: z.ZodObject<{
8
8
  question: z.ZodString;
@@ -20,14 +20,14 @@ export declare const freshnessNeededResultSchema: z.ZodObject<{
20
20
  }>;
21
21
  verdict: z.ZodEnum<{
22
22
  unclear: "unclear";
23
- current: "current";
24
23
  stable: "stable";
24
+ current: "current";
25
25
  }>;
26
26
  confidence: z.ZodNumber;
27
27
  probabilities: z.ZodRecord<z.ZodEnum<{
28
28
  unclear: "unclear";
29
- current: "current";
30
29
  stable: "stable";
30
+ current: "current";
31
31
  }>, z.ZodNumber>;
32
32
  }, z.core.$strip>;
33
33
  export type FreshnessNeededInput = z.infer<typeof freshnessNeededInputSchema>;
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  export declare const handoffVerdictSchema: z.ZodEnum<{
3
+ unclear: "unclear";
3
4
  matches: "matches";
4
5
  does_not_match: "does_not_match";
5
- unclear: "unclear";
6
6
  }>;
7
7
  export declare const handoffRuleSchema: z.ZodObject<{
8
8
  id: z.ZodString;
@@ -41,15 +41,15 @@ export declare const handoffResultSchema: z.ZodObject<{
41
41
  review: "review";
42
42
  }>;
43
43
  verdict: z.ZodEnum<{
44
+ unclear: "unclear";
44
45
  matches: "matches";
45
46
  does_not_match: "does_not_match";
46
- unclear: "unclear";
47
47
  }>;
48
48
  confidence: z.ZodNumber;
49
49
  probabilities: z.ZodRecord<z.ZodEnum<{
50
+ unclear: "unclear";
50
51
  matches: "matches";
51
52
  does_not_match: "does_not_match";
52
- unclear: "unclear";
53
53
  }>, z.ZodNumber>;
54
54
  }, z.core.$strip>>;
55
55
  }, z.core.$strip>;
@@ -0,0 +1,27 @@
1
+ {
2
+ "input": {
3
+ "firstInstruction": "Send the report as a PDF attachment.",
4
+ "secondInstruction": "Send the report only as plain text in the email body; do not attach any files.",
5
+ "context": "Both instructions apply to the same outgoing report email."
6
+ },
7
+ "response": {
8
+ "model": "demo-fixture",
9
+ "usage": {
10
+ "input_tokens": 0,
11
+ "output_tokens": 0
12
+ },
13
+ "answers": {
14
+ "decision": {
15
+ "type": "choice",
16
+ "choice": "conflicting",
17
+ "confidence": 0.96,
18
+ "probabilities": {
19
+ "compatible": 0.013333333333333334,
20
+ "conflicting": 0.96,
21
+ "different_scope": 0.013333333333333334,
22
+ "unclear": 0.013333333333333334
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,5 @@
1
+ import type { RecipeOptions } from '../../src/schema.js';
2
+ import type { InstructionConflictInput, InstructionConflictResult } from './schema.js';
3
+ export declare function instructionConflict(input: InstructionConflictInput, options?: RecipeOptions): Promise<InstructionConflictResult>;
4
+ export { instructionConflictInputSchema, instructionConflictResultSchema, instructionConflictVerdictSchema, } from './schema.js';
5
+ export type { InstructionConflictInput, InstructionConflictResult, InstructionConflictVerdict, } from './schema.js';
@@ -0,0 +1,16 @@
1
+ import { evaluateChoice } from '../../src/decisions.js';
2
+ import { instructionConflictInputSchema, instructionConflictResultSchema } from './schema.js';
3
+ export async function instructionConflict(input, options = {}) {
4
+ const { minConfidence = 0.8, ...state } = instructionConflictInputSchema.parse(input);
5
+ const decision = await evaluateChoice(state, 'Can firstInstruction and secondInstruction both be followed in context? Compare their required behavior, including prohibitions, conditions, and exceptions. A preference is not a mandatory requirement. Different wording is not a conflict. Choose conflicting only when applicable requirements cannot both be followed under the same supplied circumstances. Do not choose which instruction wins or infer authority from its wording. If their applicable scope is unresolved, choose unclear.', {
6
+ compatible: 'The instructions share an applicable scope and their requirements can both be followed.',
7
+ conflicting: 'Both instructions apply under the same supplied circumstances and require mutually incompatible behavior.',
8
+ different_scope: 'The instructions explicitly apply to separate circumstances, so their requirements do not compete.',
9
+ unclear: 'Their meaning, scope, or conditions leave it unresolved whether both can be followed.',
10
+ }, options);
11
+ return instructionConflictResultSchema.parse({
12
+ ...decision,
13
+ status: decision.confidence < minConfidence || decision.verdict === 'unclear' ? 'review' : 'ready',
14
+ });
15
+ }
16
+ export { instructionConflictInputSchema, instructionConflictResultSchema, instructionConflictVerdictSchema, } from './schema.js';
@@ -0,0 +1,40 @@
1
+ import { z } from 'zod';
2
+ export declare const instructionConflictVerdictSchema: z.ZodEnum<{
3
+ compatible: "compatible";
4
+ unclear: "unclear";
5
+ conflicting: "conflicting";
6
+ different_scope: "different_scope";
7
+ }>;
8
+ export declare const instructionConflictInputSchema: z.ZodObject<{
9
+ firstInstruction: z.ZodString;
10
+ secondInstruction: z.ZodString;
11
+ context: z.ZodOptional<z.ZodString>;
12
+ minConfidence: z.ZodOptional<z.ZodNumber>;
13
+ }, z.core.$strip>;
14
+ export declare const instructionConflictResultSchema: z.ZodObject<{
15
+ model: z.ZodString;
16
+ usage: z.ZodObject<{
17
+ input_tokens: z.ZodNumber;
18
+ output_tokens: z.ZodNumber;
19
+ }, z.core.$strip>;
20
+ status: z.ZodEnum<{
21
+ ready: "ready";
22
+ review: "review";
23
+ }>;
24
+ verdict: z.ZodEnum<{
25
+ compatible: "compatible";
26
+ unclear: "unclear";
27
+ conflicting: "conflicting";
28
+ different_scope: "different_scope";
29
+ }>;
30
+ confidence: z.ZodNumber;
31
+ probabilities: z.ZodRecord<z.ZodEnum<{
32
+ compatible: "compatible";
33
+ unclear: "unclear";
34
+ conflicting: "conflicting";
35
+ different_scope: "different_scope";
36
+ }>, z.ZodNumber>;
37
+ }, z.core.$strip>;
38
+ export type InstructionConflictInput = z.infer<typeof instructionConflictInputSchema>;
39
+ export type InstructionConflictResult = z.infer<typeof instructionConflictResultSchema>;
40
+ export type InstructionConflictVerdict = z.infer<typeof instructionConflictVerdictSchema>;
@@ -0,0 +1,22 @@
1
+ import { z } from 'zod';
2
+ import { decisionStatusSchema, nonEmptyText, probability, resultMetadataSchema, } from '../../src/schema.js';
3
+ export const instructionConflictVerdictSchema = z.enum([
4
+ 'compatible',
5
+ 'conflicting',
6
+ 'different_scope',
7
+ 'unclear',
8
+ ]);
9
+ export const instructionConflictInputSchema = z.object({
10
+ firstInstruction: nonEmptyText.describe('The first instruction to compare.'),
11
+ secondInstruction: nonEmptyText.describe('The second instruction to compare.'),
12
+ context: nonEmptyText
13
+ .describe('The task and circumstances in which the instructions may apply.')
14
+ .optional(),
15
+ minConfidence: probability.optional(),
16
+ });
17
+ export const instructionConflictResultSchema = resultMetadataSchema.extend({
18
+ status: decisionStatusSchema,
19
+ verdict: instructionConflictVerdictSchema,
20
+ confidence: probability,
21
+ probabilities: z.record(instructionConflictVerdictSchema, probability),
22
+ });
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const passageDuplicateVerdictSchema: z.ZodEnum<{
3
- unclear: "unclear";
4
3
  duplicate: "duplicate";
4
+ unclear: "unclear";
5
5
  overlapping: "overlapping";
6
6
  distinct: "distinct";
7
7
  }>;
@@ -21,15 +21,15 @@ export declare const passageDuplicateResultSchema: z.ZodObject<{
21
21
  review: "review";
22
22
  }>;
23
23
  verdict: z.ZodEnum<{
24
- unclear: "unclear";
25
24
  duplicate: "duplicate";
25
+ unclear: "unclear";
26
26
  overlapping: "overlapping";
27
27
  distinct: "distinct";
28
28
  }>;
29
29
  confidence: z.ZodNumber;
30
30
  probabilities: z.ZodRecord<z.ZodEnum<{
31
- unclear: "unclear";
32
31
  duplicate: "duplicate";
32
+ unclear: "unclear";
33
33
  overlapping: "overlapping";
34
34
  distinct: "distinct";
35
35
  }>, z.ZodNumber>;
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  export declare const preferenceKindVerdictSchema: z.ZodEnum<{
3
- unclear: "unclear";
4
- fact: "fact";
5
3
  preference: "preference";
4
+ fact: "fact";
5
+ unclear: "unclear";
6
6
  temporary_request: "temporary_request";
7
7
  }>;
8
8
  export declare const preferenceKindInputSchema: z.ZodObject<{
@@ -21,16 +21,16 @@ export declare const preferenceKindResultSchema: z.ZodObject<{
21
21
  review: "review";
22
22
  }>;
23
23
  verdict: z.ZodEnum<{
24
- unclear: "unclear";
25
- fact: "fact";
26
24
  preference: "preference";
25
+ fact: "fact";
26
+ unclear: "unclear";
27
27
  temporary_request: "temporary_request";
28
28
  }>;
29
29
  confidence: z.ZodNumber;
30
30
  probabilities: z.ZodRecord<z.ZodEnum<{
31
- unclear: "unclear";
32
- fact: "fact";
33
31
  preference: "preference";
32
+ fact: "fact";
33
+ unclear: "unclear";
34
34
  temporary_request: "temporary_request";
35
35
  }>, z.ZodNumber>;
36
36
  }, z.core.$strip>;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const promiseCheckVerdictSchema: z.ZodEnum<{
3
- unsupported: "unsupported";
4
3
  unclear: "unclear";
4
+ unsupported: "unsupported";
5
5
  within_commitments: "within_commitments";
6
6
  }>;
7
7
  export declare const promiseCheckInputSchema: z.ZodObject<{
@@ -20,14 +20,14 @@ export declare const promiseCheckResultSchema: z.ZodObject<{
20
20
  review: "review";
21
21
  }>;
22
22
  verdict: z.ZodEnum<{
23
- unsupported: "unsupported";
24
23
  unclear: "unclear";
24
+ unsupported: "unsupported";
25
25
  within_commitments: "within_commitments";
26
26
  }>;
27
27
  confidence: z.ZodNumber;
28
28
  probabilities: z.ZodRecord<z.ZodEnum<{
29
- unsupported: "unsupported";
30
29
  unclear: "unclear";
30
+ unsupported: "unsupported";
31
31
  within_commitments: "within_commitments";
32
32
  }>, z.ZodNumber>;
33
33
  }, z.core.$strip>;