@descryy/core 0.1.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 (366) hide show
  1. package/LICENSE +21 -0
  2. package/dist/capabilities/index.d.ts +3 -0
  3. package/dist/capabilities/index.d.ts.map +1 -0
  4. package/dist/capabilities/index.js +2 -0
  5. package/dist/capabilities/index.js.map +1 -0
  6. package/dist/capabilities/preconditions.d.ts +99 -0
  7. package/dist/capabilities/preconditions.d.ts.map +1 -0
  8. package/dist/capabilities/preconditions.js +94 -0
  9. package/dist/capabilities/preconditions.js.map +1 -0
  10. package/dist/contracts/engine.d.ts +90 -0
  11. package/dist/contracts/engine.d.ts.map +1 -0
  12. package/dist/contracts/engine.js +291 -0
  13. package/dist/contracts/engine.js.map +1 -0
  14. package/dist/contracts/index.d.ts +9 -0
  15. package/dist/contracts/index.d.ts.map +1 -0
  16. package/dist/contracts/index.js +5 -0
  17. package/dist/contracts/index.js.map +1 -0
  18. package/dist/contracts/orphans.d.ts +96 -0
  19. package/dist/contracts/orphans.d.ts.map +1 -0
  20. package/dist/contracts/orphans.js +241 -0
  21. package/dist/contracts/orphans.js.map +1 -0
  22. package/dist/contracts/paths.d.ts +132 -0
  23. package/dist/contracts/paths.d.ts.map +1 -0
  24. package/dist/contracts/paths.js +245 -0
  25. package/dist/contracts/paths.js.map +1 -0
  26. package/dist/contracts/shapes.d.ts +99 -0
  27. package/dist/contracts/shapes.d.ts.map +1 -0
  28. package/dist/contracts/shapes.js +196 -0
  29. package/dist/contracts/shapes.js.map +1 -0
  30. package/dist/governance/budget.d.ts +89 -0
  31. package/dist/governance/budget.d.ts.map +1 -0
  32. package/dist/governance/budget.js +101 -0
  33. package/dist/governance/budget.js.map +1 -0
  34. package/dist/governance/candidate-boundary.d.ts +49 -0
  35. package/dist/governance/candidate-boundary.d.ts.map +1 -0
  36. package/dist/governance/candidate-boundary.js +51 -0
  37. package/dist/governance/candidate-boundary.js.map +1 -0
  38. package/dist/governance/escalation.d.ts +63 -0
  39. package/dist/governance/escalation.d.ts.map +1 -0
  40. package/dist/governance/escalation.js +72 -0
  41. package/dist/governance/escalation.js.map +1 -0
  42. package/dist/governance/fact-boundary.d.ts +77 -0
  43. package/dist/governance/fact-boundary.d.ts.map +1 -0
  44. package/dist/governance/fact-boundary.js +91 -0
  45. package/dist/governance/fact-boundary.js.map +1 -0
  46. package/dist/governance/finding-funnel.d.ts +109 -0
  47. package/dist/governance/finding-funnel.d.ts.map +1 -0
  48. package/dist/governance/finding-funnel.js +137 -0
  49. package/dist/governance/finding-funnel.js.map +1 -0
  50. package/dist/governance/index.d.ts +11 -0
  51. package/dist/governance/index.d.ts.map +1 -0
  52. package/dist/governance/index.js +6 -0
  53. package/dist/governance/index.js.map +1 -0
  54. package/dist/graph/build.d.ts +127 -0
  55. package/dist/graph/build.d.ts.map +1 -0
  56. package/dist/graph/build.js +0 -0
  57. package/dist/graph/build.js.map +1 -0
  58. package/dist/graph/cross-language.d.ts +70 -0
  59. package/dist/graph/cross-language.d.ts.map +1 -0
  60. package/dist/graph/cross-language.js +104 -0
  61. package/dist/graph/cross-language.js.map +1 -0
  62. package/dist/graph/index.d.ts +11 -0
  63. package/dist/graph/index.d.ts.map +1 -0
  64. package/dist/graph/index.js +6 -0
  65. package/dist/graph/index.js.map +1 -0
  66. package/dist/graph/merge.d.ts +95 -0
  67. package/dist/graph/merge.d.ts.map +1 -0
  68. package/dist/graph/merge.js +131 -0
  69. package/dist/graph/merge.js.map +1 -0
  70. package/dist/graph/persist.d.ts +42 -0
  71. package/dist/graph/persist.d.ts.map +1 -0
  72. package/dist/graph/persist.js +52 -0
  73. package/dist/graph/persist.js.map +1 -0
  74. package/dist/graph/runtime-confirmation.d.ts +169 -0
  75. package/dist/graph/runtime-confirmation.d.ts.map +1 -0
  76. package/dist/graph/runtime-confirmation.js +318 -0
  77. package/dist/graph/runtime-confirmation.js.map +1 -0
  78. package/dist/index.d.ts +18 -0
  79. package/dist/index.d.ts.map +1 -0
  80. package/dist/index.js +19 -0
  81. package/dist/index.js.map +1 -0
  82. package/dist/ledger/index.d.ts +5 -0
  83. package/dist/ledger/index.d.ts.map +1 -0
  84. package/dist/ledger/index.js +3 -0
  85. package/dist/ledger/index.js.map +1 -0
  86. package/dist/ledger/mint.d.ts +81 -0
  87. package/dist/ledger/mint.d.ts.map +1 -0
  88. package/dist/ledger/mint.js +138 -0
  89. package/dist/ledger/mint.js.map +1 -0
  90. package/dist/ledger/resolve.d.ts +124 -0
  91. package/dist/ledger/resolve.d.ts.map +1 -0
  92. package/dist/ledger/resolve.js +290 -0
  93. package/dist/ledger/resolve.js.map +1 -0
  94. package/dist/multipr/fingerprint.d.ts +56 -0
  95. package/dist/multipr/fingerprint.d.ts.map +1 -0
  96. package/dist/multipr/fingerprint.js +169 -0
  97. package/dist/multipr/fingerprint.js.map +1 -0
  98. package/dist/multipr/hidden-dependency.d.ts +120 -0
  99. package/dist/multipr/hidden-dependency.d.ts.map +1 -0
  100. package/dist/multipr/hidden-dependency.js +185 -0
  101. package/dist/multipr/hidden-dependency.js.map +1 -0
  102. package/dist/multipr/index.d.ts +14 -0
  103. package/dist/multipr/index.d.ts.map +1 -0
  104. package/dist/multipr/index.js +8 -0
  105. package/dist/multipr/index.js.map +1 -0
  106. package/dist/multipr/mechanical.d.ts +239 -0
  107. package/dist/multipr/mechanical.d.ts.map +1 -0
  108. package/dist/multipr/mechanical.js +333 -0
  109. package/dist/multipr/mechanical.js.map +1 -0
  110. package/dist/multipr/migration-heads.d.ts +160 -0
  111. package/dist/multipr/migration-heads.d.ts.map +1 -0
  112. package/dist/multipr/migration-heads.js +212 -0
  113. package/dist/multipr/migration-heads.js.map +1 -0
  114. package/dist/multipr/overlap.d.ts +186 -0
  115. package/dist/multipr/overlap.d.ts.map +1 -0
  116. package/dist/multipr/overlap.js +254 -0
  117. package/dist/multipr/overlap.js.map +1 -0
  118. package/dist/multipr/scope-store.d.ts +105 -0
  119. package/dist/multipr/scope-store.d.ts.map +1 -0
  120. package/dist/multipr/scope-store.js +182 -0
  121. package/dist/multipr/scope-store.js.map +1 -0
  122. package/dist/multipr/superseded.d.ts +133 -0
  123. package/dist/multipr/superseded.d.ts.map +1 -0
  124. package/dist/multipr/superseded.js +128 -0
  125. package/dist/multipr/superseded.js.map +1 -0
  126. package/dist/query/confirmed-facts.d.ts +56 -0
  127. package/dist/query/confirmed-facts.d.ts.map +1 -0
  128. package/dist/query/confirmed-facts.js +64 -0
  129. package/dist/query/confirmed-facts.js.map +1 -0
  130. package/dist/query/declared-value-closure.d.ts +126 -0
  131. package/dist/query/declared-value-closure.d.ts.map +1 -0
  132. package/dist/query/declared-value-closure.js +156 -0
  133. package/dist/query/declared-value-closure.js.map +1 -0
  134. package/dist/query/index.d.ts +28 -0
  135. package/dist/query/index.d.ts.map +1 -0
  136. package/dist/query/index.js +15 -0
  137. package/dist/query/index.js.map +1 -0
  138. package/dist/query/memory.d.ts +20 -0
  139. package/dist/query/memory.d.ts.map +1 -0
  140. package/dist/query/memory.js +55 -0
  141. package/dist/query/memory.js.map +1 -0
  142. package/dist/query/provider.d.ts +127 -0
  143. package/dist/query/provider.d.ts.map +1 -0
  144. package/dist/query/provider.js +54 -0
  145. package/dist/query/provider.js.map +1 -0
  146. package/dist/query/queries.d.ts +119 -0
  147. package/dist/query/queries.d.ts.map +1 -0
  148. package/dist/query/queries.js +267 -0
  149. package/dist/query/queries.js.map +1 -0
  150. package/dist/query/refusal-fetch.d.ts +114 -0
  151. package/dist/query/refusal-fetch.d.ts.map +1 -0
  152. package/dist/query/refusal-fetch.js +200 -0
  153. package/dist/query/refusal-fetch.js.map +1 -0
  154. package/dist/query/refusal-questions.d.ts +123 -0
  155. package/dist/query/refusal-questions.d.ts.map +1 -0
  156. package/dist/query/refusal-questions.js +122 -0
  157. package/dist/query/refusal-questions.js.map +1 -0
  158. package/dist/query/root-cause-score.d.ts +218 -0
  159. package/dist/query/root-cause-score.d.ts.map +1 -0
  160. package/dist/query/root-cause-score.js +251 -0
  161. package/dist/query/root-cause-score.js.map +1 -0
  162. package/dist/query/row-closure-picture.d.ts +108 -0
  163. package/dist/query/row-closure-picture.d.ts.map +1 -0
  164. package/dist/query/row-closure-picture.js +131 -0
  165. package/dist/query/row-closure-picture.js.map +1 -0
  166. package/dist/query/similar-incidents.d.ts +76 -0
  167. package/dist/query/similar-incidents.d.ts.map +1 -0
  168. package/dist/query/similar-incidents.js +169 -0
  169. package/dist/query/similar-incidents.js.map +1 -0
  170. package/dist/query/sqlite.d.ts +13 -0
  171. package/dist/query/sqlite.d.ts.map +1 -0
  172. package/dist/query/sqlite.js +54 -0
  173. package/dist/query/sqlite.js.map +1 -0
  174. package/dist/query/traverse.d.ts +110 -0
  175. package/dist/query/traverse.d.ts.map +1 -0
  176. package/dist/query/traverse.js +0 -0
  177. package/dist/query/traverse.js.map +1 -0
  178. package/dist/query/unresolved.d.ts +195 -0
  179. package/dist/query/unresolved.d.ts.map +1 -0
  180. package/dist/query/unresolved.js +225 -0
  181. package/dist/query/unresolved.js.map +1 -0
  182. package/dist/query/verification-status.d.ts +134 -0
  183. package/dist/query/verification-status.d.ts.map +1 -0
  184. package/dist/query/verification-status.js +163 -0
  185. package/dist/query/verification-status.js.map +1 -0
  186. package/dist/recording/index.d.ts +26 -0
  187. package/dist/recording/index.d.ts.map +1 -0
  188. package/dist/recording/index.js +30 -0
  189. package/dist/recording/index.js.map +1 -0
  190. package/dist/recording/migrate.d.ts +22 -0
  191. package/dist/recording/migrate.d.ts.map +1 -0
  192. package/dist/recording/migrate.js +51 -0
  193. package/dist/recording/migrate.js.map +1 -0
  194. package/dist/recording/reader.d.ts +27 -0
  195. package/dist/recording/reader.d.ts.map +1 -0
  196. package/dist/recording/reader.js +55 -0
  197. package/dist/recording/reader.js.map +1 -0
  198. package/dist/recording/redact.d.ts +63 -0
  199. package/dist/recording/redact.d.ts.map +1 -0
  200. package/dist/recording/redact.js +98 -0
  201. package/dist/recording/redact.js.map +1 -0
  202. package/dist/recording/schema.d.ts +41 -0
  203. package/dist/recording/schema.d.ts.map +1 -0
  204. package/dist/recording/schema.js +104 -0
  205. package/dist/recording/schema.js.map +1 -0
  206. package/dist/recording/writer.d.ts +120 -0
  207. package/dist/recording/writer.d.ts.map +1 -0
  208. package/dist/recording/writer.js +81 -0
  209. package/dist/recording/writer.js.map +1 -0
  210. package/dist/scoping/fanout.d.ts +86 -0
  211. package/dist/scoping/fanout.d.ts.map +1 -0
  212. package/dist/scoping/fanout.js +95 -0
  213. package/dist/scoping/fanout.js.map +1 -0
  214. package/dist/scoping/index.d.ts +10 -0
  215. package/dist/scoping/index.d.ts.map +1 -0
  216. package/dist/scoping/index.js +6 -0
  217. package/dist/scoping/index.js.map +1 -0
  218. package/dist/scoping/score.d.ts +83 -0
  219. package/dist/scoping/score.d.ts.map +1 -0
  220. package/dist/scoping/score.js +125 -0
  221. package/dist/scoping/score.js.map +1 -0
  222. package/dist/scoping/tiers.d.ts +32 -0
  223. package/dist/scoping/tiers.d.ts.map +1 -0
  224. package/dist/scoping/tiers.js +35 -0
  225. package/dist/scoping/tiers.js.map +1 -0
  226. package/dist/scoping/traverse.d.ts +60 -0
  227. package/dist/scoping/traverse.d.ts.map +1 -0
  228. package/dist/scoping/traverse.js +172 -0
  229. package/dist/scoping/traverse.js.map +1 -0
  230. package/dist/scoping/weights.d.ts +97 -0
  231. package/dist/scoping/weights.d.ts.map +1 -0
  232. package/dist/scoping/weights.js +167 -0
  233. package/dist/scoping/weights.js.map +1 -0
  234. package/dist/sources/git/diff.d.ts +53 -0
  235. package/dist/sources/git/diff.d.ts.map +1 -0
  236. package/dist/sources/git/diff.js +140 -0
  237. package/dist/sources/git/diff.js.map +1 -0
  238. package/dist/sources/git/env.d.ts +2 -0
  239. package/dist/sources/git/env.d.ts.map +1 -0
  240. package/dist/sources/git/env.js +21 -0
  241. package/dist/sources/git/env.js.map +1 -0
  242. package/dist/sources/git/history.d.ts +140 -0
  243. package/dist/sources/git/history.d.ts.map +1 -0
  244. package/dist/sources/git/history.js +314 -0
  245. package/dist/sources/git/history.js.map +1 -0
  246. package/dist/sources/git/index.d.ts +7 -0
  247. package/dist/sources/git/index.d.ts.map +1 -0
  248. package/dist/sources/git/index.js +4 -0
  249. package/dist/sources/git/index.js.map +1 -0
  250. package/dist/sources/git/source.d.ts +95 -0
  251. package/dist/sources/git/source.d.ts.map +1 -0
  252. package/dist/sources/git/source.js +0 -0
  253. package/dist/sources/git/source.js.map +1 -0
  254. package/dist/sources/migrations/dialects.d.ts +59 -0
  255. package/dist/sources/migrations/dialects.d.ts.map +1 -0
  256. package/dist/sources/migrations/dialects.js +84 -0
  257. package/dist/sources/migrations/dialects.js.map +1 -0
  258. package/dist/sources/migrations/index.d.ts +3 -0
  259. package/dist/sources/migrations/index.d.ts.map +1 -0
  260. package/dist/sources/migrations/index.js +2 -0
  261. package/dist/sources/migrations/index.js.map +1 -0
  262. package/dist/sources/migrations/read.d.ts +113 -0
  263. package/dist/sources/migrations/read.d.ts.map +1 -0
  264. package/dist/sources/migrations/read.js +270 -0
  265. package/dist/sources/migrations/read.js.map +1 -0
  266. package/dist/sources/workspace/index.d.ts +3 -0
  267. package/dist/sources/workspace/index.d.ts.map +1 -0
  268. package/dist/sources/workspace/index.js +2 -0
  269. package/dist/sources/workspace/index.js.map +1 -0
  270. package/dist/sources/workspace/workspace.d.ts +64 -0
  271. package/dist/sources/workspace/workspace.d.ts.map +1 -0
  272. package/dist/sources/workspace/workspace.js +294 -0
  273. package/dist/sources/workspace/workspace.js.map +1 -0
  274. package/dist/store/driver/driver.d.ts +82 -0
  275. package/dist/store/driver/driver.d.ts.map +1 -0
  276. package/dist/store/driver/driver.js +31 -0
  277. package/dist/store/driver/driver.js.map +1 -0
  278. package/dist/store/driver/node-sqlite.d.ts +28 -0
  279. package/dist/store/driver/node-sqlite.d.ts.map +1 -0
  280. package/dist/store/driver/node-sqlite.js +188 -0
  281. package/dist/store/driver/node-sqlite.js.map +1 -0
  282. package/dist/store/index.d.ts +33 -0
  283. package/dist/store/index.d.ts.map +1 -0
  284. package/dist/store/index.js +46 -0
  285. package/dist/store/index.js.map +1 -0
  286. package/dist/store/migrate.d.ts +68 -0
  287. package/dist/store/migrate.d.ts.map +1 -0
  288. package/dist/store/migrate.js +140 -0
  289. package/dist/store/migrate.js.map +1 -0
  290. package/dist/store/reader.d.ts +127 -0
  291. package/dist/store/reader.d.ts.map +1 -0
  292. package/dist/store/reader.js +269 -0
  293. package/dist/store/reader.js.map +1 -0
  294. package/dist/store/schema.d.ts +87 -0
  295. package/dist/store/schema.d.ts.map +1 -0
  296. package/dist/store/schema.js +322 -0
  297. package/dist/store/schema.js.map +1 -0
  298. package/dist/store/writer.d.ts +116 -0
  299. package/dist/store/writer.d.ts.map +1 -0
  300. package/dist/store/writer.js +279 -0
  301. package/dist/store/writer.js.map +1 -0
  302. package/dist/tiers/certify.d.ts +375 -0
  303. package/dist/tiers/certify.d.ts.map +1 -0
  304. package/dist/tiers/certify.js +434 -0
  305. package/dist/tiers/certify.js.map +1 -0
  306. package/dist/tiers/index.d.ts +5 -0
  307. package/dist/tiers/index.d.ts.map +1 -0
  308. package/dist/tiers/index.js +3 -0
  309. package/dist/tiers/index.js.map +1 -0
  310. package/dist/tiers/ladder.d.ts +73 -0
  311. package/dist/tiers/ladder.d.ts.map +1 -0
  312. package/dist/tiers/ladder.js +197 -0
  313. package/dist/tiers/ladder.js.map +1 -0
  314. package/dist/validation/config-graph.d.ts +104 -0
  315. package/dist/validation/config-graph.d.ts.map +1 -0
  316. package/dist/validation/config-graph.js +205 -0
  317. package/dist/validation/config-graph.js.map +1 -0
  318. package/dist/validation/env.d.ts +243 -0
  319. package/dist/validation/env.d.ts.map +1 -0
  320. package/dist/validation/env.js +447 -0
  321. package/dist/validation/env.js.map +1 -0
  322. package/dist/validation/index.d.ts +16 -0
  323. package/dist/validation/index.d.ts.map +1 -0
  324. package/dist/validation/index.js +9 -0
  325. package/dist/validation/index.js.map +1 -0
  326. package/dist/validation/join-substitution.d.ts +186 -0
  327. package/dist/validation/join-substitution.d.ts.map +1 -0
  328. package/dist/validation/join-substitution.js +191 -0
  329. package/dist/validation/join-substitution.js.map +1 -0
  330. package/dist/validation/migrations.d.ts +133 -0
  331. package/dist/validation/migrations.d.ts.map +1 -0
  332. package/dist/validation/migrations.js +315 -0
  333. package/dist/validation/migrations.js.map +1 -0
  334. package/dist/validation/nodes.d.ts +32 -0
  335. package/dist/validation/nodes.d.ts.map +1 -0
  336. package/dist/validation/nodes.js +45 -0
  337. package/dist/validation/nodes.js.map +1 -0
  338. package/dist/validation/rollback.d.ts +124 -0
  339. package/dist/validation/rollback.d.ts.map +1 -0
  340. package/dist/validation/rollback.js +302 -0
  341. package/dist/validation/rollback.js.map +1 -0
  342. package/dist/validation/route-drift.d.ts +108 -0
  343. package/dist/validation/route-drift.d.ts.map +1 -0
  344. package/dist/validation/route-drift.js +103 -0
  345. package/dist/validation/route-drift.js.map +1 -0
  346. package/dist/validation/sources.d.ts +153 -0
  347. package/dist/validation/sources.d.ts.map +1 -0
  348. package/dist/validation/sources.js +409 -0
  349. package/dist/validation/sources.js.map +1 -0
  350. package/dist/worker/index.d.ts +5 -0
  351. package/dist/worker/index.d.ts.map +1 -0
  352. package/dist/worker/index.js +3 -0
  353. package/dist/worker/index.js.map +1 -0
  354. package/dist/worker/pool.d.ts +73 -0
  355. package/dist/worker/pool.d.ts.map +1 -0
  356. package/dist/worker/pool.js +203 -0
  357. package/dist/worker/pool.js.map +1 -0
  358. package/dist/worker/protocol.d.ts +91 -0
  359. package/dist/worker/protocol.d.ts.map +1 -0
  360. package/dist/worker/protocol.js +19 -0
  361. package/dist/worker/protocol.js.map +1 -0
  362. package/dist/worker/traversal.worker.d.ts +25 -0
  363. package/dist/worker/traversal.worker.d.ts.map +1 -0
  364. package/dist/worker/traversal.worker.js +124 -0
  365. package/dist/worker/traversal.worker.js.map +1 -0
  366. package/package.json +29 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"certify.d.ts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;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,SAAS,eAAe,EAAE,CAAC;IACjD;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;IAC1C;;;;;;;;OAQG;IACH,QAAQ,CAAC,eAAe,EAAE,SAAS,eAAe,EAAE,CAAC;IACrD,kEAAkE;IAClE,QAAQ,CAAC,kBAAkB,EAAE,OAAO,GAAG,SAAS,CAAC;CAClD;AA4SD,wBAAgB,OAAO,CAAC,QAAQ,EAAE,YAAY,GAAG,eAAe,CA6E/D;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,eAAe,GAAG,MAAM,CA+CtE"}
@@ -0,0 +1,434 @@
1
+ /**
2
+ * The capability-tier generator. DEC-075 §6, in code.
3
+ *
4
+ * > *"A tier is generated from `capabilities()`, never written in prose, and may
5
+ * > be published for a language only when the corpus passes at the resolution
6
+ * > the tier claims, a ≥200-edge precision draw passes on at least two
7
+ * > repositories the adapter's author did not choose, and `capabilities()`
8
+ * > declares exactly the node and edge types the adapter emitted."*
9
+ *
10
+ * ## The design point: this thing exists to say no
11
+ *
12
+ * A generator that awards a tier to everything it is shown is a rubber stamp
13
+ * with a build step. The output that matters is **the row that failed**, which
14
+ * is why `unmet` is a list of requirements with their statements rather than a
15
+ * boolean, and why `certify` never returns a bare tier without also returning
16
+ * what the next tier up is missing.
17
+ *
18
+ * Two rules follow from that, and both are the opposite of what is convenient:
19
+ *
20
+ * 1. **Absent evidence is not a pass.** No precision draw recorded means the
21
+ * attested requirement is unmet, exactly as if a recorded draw had failed.
22
+ * The alternative — treating silence as satisfaction — is how every unearned
23
+ * claim in this repository would have been generated.
24
+ * 2. **An attested requirement is labelled attested, in the output, always.**
25
+ * A machine can check "≥200 edges" and "two repositories". It cannot check
26
+ * *"the author did not choose them"*, because that is a fact about a person's
27
+ * intent. Marking it as declared-by-a-human is what stops this function
28
+ * laundering a judgement into a computed result. `certify` therefore reports
29
+ * `attestedBy` alongside the tier, and a consumer that prints the tier
30
+ * without it has dropped the only part that says who is responsible.
31
+ *
32
+ * ## What it does not do
33
+ *
34
+ * It does not run the conformance harness or the precision benches. It is given
35
+ * their results. That keeps it pure and testable, and it keeps the awkward fact
36
+ * visible: the precision evidence is **recorded by hand today**, because the
37
+ * benches are throwaway scripts that print to a terminal. `GateEvidence` is
38
+ * where that hand-recording is written down and dated, rather than living in a
39
+ * decision document that nothing reads.
40
+ */
41
+ import { LADDER, TIERS, requirementsFor } from "./ladder.js";
42
+ // ---------------------------------------------------------------------------
43
+ // Checking one requirement
44
+ // ---------------------------------------------------------------------------
45
+ const MIN_DRAW = 200;
46
+ const MIN_PRECISION = 0.98;
47
+ const MAX_CONTROL = 0.02;
48
+ /**
49
+ * Reused, not reinvented: `bench/lib/stats.mjs`'s own `TYPE_FLOOR`, the
50
+ * threshold every precision bench already applies before trusting a single
51
+ * edge type's own precision figure within a draw ("every type with >= 20
52
+ * samples >= 95%"). `bench/` cannot be imported from `packages/core` — the
53
+ * dependency runs the other way — so the value is restated here, under the
54
+ * same name, rather than a second number with no name tying it to the first.
55
+ * User-ruled (2026-08-17): a capability that moves a language's tier needs
56
+ * this many decided rows of its OWN edge type in the draws, not just an
57
+ * aggregate pass — see `checkCapability`'s use of `PrecisionDraw.perEdgeType`.
58
+ */
59
+ const TYPE_FLOOR = 20;
60
+ const REPOSITORIES_REQUIRED = 2;
61
+ function missing(wanted, have) {
62
+ if (wanted === undefined)
63
+ return [];
64
+ const present = new Set(have);
65
+ return wanted.filter((w) => !present.has(w));
66
+ }
67
+ function checkCapability(requirement, evidence) {
68
+ const caps = evidence.capabilities;
69
+ const gaps = [];
70
+ const unexercised = new Set(evidence.unpublishableTypes ?? []);
71
+ const nodeGap = missing(requirement.nodeTypes, caps.nodeTypes);
72
+ if (nodeGap.length > 0)
73
+ gaps.push(`capabilities() declares no ${nodeGap.join(", ")}`);
74
+ const edgeGap = missing(requirement.edgeTypes, caps.edgeTypes);
75
+ if (edgeGap.length > 0)
76
+ gaps.push(`capabilities() declares no ${edgeGap.join(", ")}`);
77
+ // Declared, but nothing in the corpus exercised it. `checkManifest` calls
78
+ // these `unpublishable`; a tier is exactly the publication they are unfit for.
79
+ const untested = [...(requirement.nodeTypes ?? []), ...(requirement.edgeTypes ?? [])].filter((t) => unexercised.has(t));
80
+ if (untested.length > 0) {
81
+ gaps.push(`${untested.join(", ")} is declared but no corpus pattern exercises it`);
82
+ }
83
+ if (requirement.minResolution !== undefined && caps.maxResolution < requirement.minResolution) {
84
+ gaps.push(`maxResolution is R${caps.maxResolution}, below R${requirement.minResolution}`);
85
+ }
86
+ // User-ruled type-floor check, second form. Declaring an edge type is not
87
+ // the same claim as having validated it: a mixed draw can clear its own
88
+ // aggregate bar while sampling almost none of one specific type it
89
+ // declares — Kotlin's `A.callers` passed on one decided `USES_API` row
90
+ // before this existed. The first version of this check no-opped when no
91
+ // draw carried `perEdgeType` at all, reasoning it should not newly fail a
92
+ // capability it had no evidence about. **That reasoning was itself the
93
+ // bug**: Swift's `A.callers` slipped through exactly that no-op the
94
+ // moment its `capabilities()` gained `USES_API` from a concurrent commit,
95
+ // because absence of per-type evidence read as satisfaction rather than
96
+ // as an open question. Absence of evidence is not evidence of validation,
97
+ // for a capability requirement any more than it was for `checkPrecisionDraws`'s
98
+ // staleness flag or the four hardcoded-path scripts this same pass found —
99
+ // the same defect class, four more times.
100
+ //
101
+ // So: a declared type with NO `perEdgeType` recorded anywhere for this
102
+ // language is now a FAIL, not a no-op — "declared, no per-type evidence
103
+ // recorded". A declared type WITH some `perEdgeType` recorded is checked
104
+ // against `TYPE_FLOOR`, reading an absent key within a recorded breakdown
105
+ // as zero (Kotlin's SERVES_API/USES_API and Swift's own zeros, both
106
+ // written explicitly rather than left as an absent key, for a human
107
+ // reading the JSON directly — but the code treats the two identically).
108
+ //
109
+ // Scoped to requirements that MOVE a language up a tier (id prefix "A."
110
+ // or higher — "S." today), never to "B."/"C.". Checked empirically before
111
+ // being kept, not assumed: applying this unscoped collapsed every tier in
112
+ // `tiers.test.ts` to C, including "a complete adapter with two qualifying
113
+ // draws reaches Tier S" — B.declarations (CALLS, IMPORTS) and B.tests
114
+ // (TESTS) are baseline requirements every real adapter clears via
115
+ // conformance and B.r2, not a capability claimed to "move" anything, and
116
+ // no adapter in this fleet (nor any test fixture) has ever recorded a
117
+ // per-type breakdown for them. Applying the stricter rule there is not
118
+ // "the same defect class" — it is asking a floor requirement to answer a
119
+ // question only a promotion requirement was ever meant to ask.
120
+ const isPromotionRequirement = requirement.id.startsWith("A.") || requirement.id.startsWith("S.");
121
+ for (const type of requirement.edgeTypes ?? []) {
122
+ if (!caps.edgeTypes.includes(type))
123
+ continue; // already named in edgeGap above
124
+ if (!isPromotionRequirement)
125
+ continue;
126
+ const drawsWithBreakdown = evidence.precisionDraws.filter((d) => d.perEdgeType !== undefined);
127
+ if (drawsWithBreakdown.length === 0) {
128
+ gaps.push(`${type} declared, no per-type evidence recorded — the capability that would earn this requirement ` +
129
+ `was never broken out by edge type in any recorded draw`);
130
+ continue;
131
+ }
132
+ const decided = drawsWithBreakdown.reduce((sum, d) => sum + (d.perEdgeType?.[type]?.decided ?? 0), 0);
133
+ if (decided < TYPE_FLOOR) {
134
+ gaps.push(`${type} ${decided}/${TYPE_FLOOR} decided rows across the recorded precision draws — declared, ` +
135
+ `but not validated by the draw at the floor every edge type is otherwise held to`);
136
+ }
137
+ }
138
+ return gaps.length === 0 ? null : { requirement, because: gaps.join("; ") };
139
+ }
140
+ function checkConformance(requirement, evidence) {
141
+ const wanted = requirement.minResolution ?? 0;
142
+ // A run at a HIGHER resolution does not stand in for a lower one, and a run at
143
+ // a lower one certainly does not stand in for a higher. The sweep exists so
144
+ // every level has its own verdict; take the one asked for.
145
+ const run = evidence.conformance.find((c) => c.resolution === wanted);
146
+ if (run === undefined) {
147
+ return { requirement, because: `no conformance run recorded at R${wanted}` };
148
+ }
149
+ if (!run.passed)
150
+ return { requirement, because: `the corpus does not pass at R${wanted}` };
151
+ if (!run.manifestClean) {
152
+ return { requirement, because: `the R${wanted} run's manifest check is not clean (DEC-070)` };
153
+ }
154
+ return null;
155
+ }
156
+ /**
157
+ * DEC-075 §6.2, and the one requirement a machine cannot finish on its own.
158
+ *
159
+ * Checked here: the draw size, the precision, the negative control, and that
160
+ * **two distinct repositories** qualify. Declared, not checked: that the author
161
+ * did not choose them.
162
+ */
163
+ function checkPrecisionDraws(requirement, evidence) {
164
+ const draws = evidence.precisionDraws;
165
+ if (draws.length === 0) {
166
+ return {
167
+ requirement,
168
+ because: "no precision draw is recorded — absent evidence is not a pass",
169
+ };
170
+ }
171
+ const reasons = [];
172
+ const qualifying = draws.filter((d) => {
173
+ if (d.authorChose) {
174
+ reasons.push(`${d.repository}: the author chose this repository, so it does not count toward the two`);
175
+ return false;
176
+ }
177
+ if (d.drawn < MIN_DRAW) {
178
+ // A population of zero is not a short sample. Saying "below 200" there
179
+ // tells a reader to measure harder, when nothing exists to measure.
180
+ const drawable = drawableFrom(d);
181
+ reasons.push(drawable === undefined
182
+ ? `${d.repository}: ${d.drawn} edges drawn, below ${MIN_DRAW} ` +
183
+ `(population not recorded, so this cannot be told from an empty one)`
184
+ : drawable === null
185
+ ? `${d.repository}: ${d.drawn} of ${MIN_DRAW} drawn from a ${d.population}-edge population, but the ` +
186
+ `drawable count could not be computed — the refusal census ran with no known internal hosts, so every ` +
187
+ `absolute target classified as out of scope. Subtracting there would let an adapter improve this row ` +
188
+ `by declaring less. Supply internal hosts and re-run`
189
+ : drawable === 0
190
+ ? `${d.repository}: 0 of ${MIN_DRAW} drawable — ` +
191
+ (d.population === 0
192
+ ? `the reference set contains no ${d.edgeType} population for this adapter`
193
+ : `all ${d.population} candidates target something this workspace does not serve, so none can ever ` +
194
+ `become an edge here`) +
195
+ `. That is a fact about the corpus, not about the adapter: the answer is other repositories, ` +
196
+ `not more measurement`
197
+ : `${d.repository}: ${d.drawn} edges drawn, below ${MIN_DRAW}, of ${drawable} drawable` +
198
+ (d.population !== undefined && drawable < d.population
199
+ ? ` (${d.population} seen, ${d.population - drawable} out of scope)`
200
+ : "") +
201
+ ` — measured and short, and the gap is the adapter's`);
202
+ return false;
203
+ }
204
+ // Precision is measured over DECIDED rows, never over the raw draw size
205
+ // — an adjudicator that honestly refuses to judge a row is not the same
206
+ // fact as one that judged it wrong, and folding the two into one
207
+ // denominator punishes the honest refusal exactly as hard as the wrong
208
+ // answer. Coverage (decided/drawn) is reported separately, never here —
209
+ // see `PrecisionDraw.decided`'s own comment.
210
+ const decided = d.decided ?? d.drawn;
211
+ if (d.correct / decided < MIN_PRECISION) {
212
+ reasons.push(`${d.repository}: precision ${d.correct}/${decided}` +
213
+ (decided === d.drawn ? "" : ` (of ${d.drawn} drawn, ${decided} decided)`) +
214
+ `, below ${MIN_PRECISION * 100}%`);
215
+ return false;
216
+ }
217
+ if (d.controlDrawn > 0 && d.controlCorrect / d.controlDrawn > MAX_CONTROL) {
218
+ reasons.push(`${d.repository}: negative control ${d.controlCorrect}/${d.controlDrawn}, above ${MAX_CONTROL * 100}%`);
219
+ return false;
220
+ }
221
+ if (d.controlDrawn === 0) {
222
+ reasons.push(`${d.repository}: no negative control was run, so the precision figure is unguarded`);
223
+ return false;
224
+ }
225
+ return true;
226
+ });
227
+ const repositories = new Set(qualifying.map((d) => d.repository));
228
+ if (repositories.size < REPOSITORIES_REQUIRED) {
229
+ const head = `${repositories.size} of ${REPOSITORIES_REQUIRED} qualifying repositories`;
230
+ return {
231
+ requirement,
232
+ because: reasons.length > 0 ? `${head} — ${reasons.join("; ")}` : head,
233
+ };
234
+ }
235
+ return null;
236
+ }
237
+ /**
238
+ * A limit is admissible only if it says what it is and who says so.
239
+ *
240
+ * The abuse this guards against is the easy one: labelling an unbuilt
241
+ * capability "structural" to collect the tier. It cannot be checked mechanically
242
+ * — whether a language *can* have a failing accessor is a fact about the
243
+ * language — so the defence is that the claim is attributable and printed.
244
+ */
245
+ function admissibleLimits(evidence) {
246
+ return (evidence.structuralLimits ?? []).filter((l) => l.id.trim() !== "" && l.reason.trim() !== "" && l.declaredBy.trim() !== "");
247
+ }
248
+ /**
249
+ * A cap is admissible only when it says what it would claim, what it does claim,
250
+ * **what would lift it**, and who declared it. The `pendingOn` requirement is the
251
+ * one doing real work: without it a cap can never be discharged and would sit on
252
+ * the certificate indefinitely, reading as caution rather than as a scheduled
253
+ * reconsideration.
254
+ */
255
+ function admissibleCaps(evidence) {
256
+ return (evidence.policyCaps ?? []).filter((c) => c.id.trim() !== "" &&
257
+ c.claimable.trim() !== "" &&
258
+ c.claimed.trim() !== "" &&
259
+ c.pendingOn.trim() !== "" &&
260
+ c.declaredBy.trim() !== "");
261
+ }
262
+ /**
263
+ * How many candidates could *ever* have become edges here.
264
+ *
265
+ * `null` means **not computable**, which is neither zero nor a number: the
266
+ * census classified against no known internal hosts, so every absolute target
267
+ * counted as out of scope and the subtraction would flatter the adapter.
268
+ */
269
+ function drawableFrom(d) {
270
+ if (d.population === undefined)
271
+ return undefined;
272
+ if (d.refusals === undefined)
273
+ return d.population;
274
+ if (!d.refusals.scopeKnown)
275
+ return null;
276
+ return Math.max(0, d.population - d.refusals.outOfScope);
277
+ }
278
+ function checkRequirement(requirement, evidence) {
279
+ switch (requirement.kind) {
280
+ case "capability":
281
+ return checkCapability(requirement, evidence);
282
+ case "conformance":
283
+ return checkConformance(requirement, evidence);
284
+ case "attested":
285
+ return checkPrecisionDraws(requirement, evidence);
286
+ }
287
+ }
288
+ // ---------------------------------------------------------------------------
289
+ // DEC-075 §6.3
290
+ // ---------------------------------------------------------------------------
291
+ /**
292
+ * Does `capabilities()` declare exactly what was emitted?
293
+ *
294
+ * Returns `"unknown"` when no run was supplied, which is **not** the same as
295
+ * `true` and is reported as its own value for that reason. Over-declaring is
296
+ * the failure that matters here: an adapter claiming `MODEL` it never emits
297
+ * would be handed Tier S by the ladder above on the strength of a declaration.
298
+ * Under-declaring is DEC-070's `thin` verdict and is caught there.
299
+ */
300
+ function capabilitiesHonest(evidence) {
301
+ if (evidence.emittedNodeTypes === undefined || evidence.emittedEdgeTypes === undefined) {
302
+ return "unknown";
303
+ }
304
+ const overNodes = missing(evidence.capabilities.nodeTypes, evidence.emittedNodeTypes);
305
+ const overEdges = missing(evidence.capabilities.edgeTypes, evidence.emittedEdgeTypes);
306
+ return overNodes.length === 0 && overEdges.length === 0;
307
+ }
308
+ // ---------------------------------------------------------------------------
309
+ // The generator
310
+ // ---------------------------------------------------------------------------
311
+ export function certify(evidence) {
312
+ const byTier = { S: [], A: [], B: [], C: [] };
313
+ const limits = admissibleLimits(evidence);
314
+ const limitedIds = new Set(limits.map((l) => l.id));
315
+ for (const definition of LADDER) {
316
+ byTier[definition.tier] = requirementsFor(definition.tier)
317
+ // A requirement this language cannot satisfy is NOT-APPLICABLE: it does
318
+ // not block the tier and it does not disappear. It reappears below as a
319
+ // published limitation, which is the whole point of the third verdict.
320
+ .filter((r) => !limitedIds.has(r.id))
321
+ .map((r) => checkRequirement(r, evidence))
322
+ .filter((u) => u !== null);
323
+ }
324
+ // Highest tier with nothing unmet. TIERS is S-first.
325
+ const awarded = TIERS.find((t) => byTier[t].length === 0) ?? null;
326
+ const above = awarded === null ? "C" : awarded === "S" ? null : TIERS[TIERS.indexOf(awarded) - 1] ?? null;
327
+ const restsOnAttestation = awarded !== null && requirementsFor(awarded).some((r) => r.kind === "attested");
328
+ const attestedBy = restsOnAttestation
329
+ ? [...new Set(evidence.precisionDraws.filter((d) => !d.authorChose).map((d) => d.recordedBy))]
330
+ : [];
331
+ /**
332
+ * Which edge types the qualifying draws actually covered.
333
+ *
334
+ * `checkPrecisionDraws` has no edge-type filter — a draw of any type that
335
+ * clears the bar counts toward DEC-075 §6.2's "two repositories", because
336
+ * the requirement DEC-075 §6 states is "a ≥200-edge precision draw", not
337
+ * "a draw of the edge type this tier's own capability rows named". That is
338
+ * correct rather than a gap: `USES_API` is the one edge type that cannot
339
+ * carry a negative control at all (DEC-164 §2), so requiring the draw be
340
+ * `USES_API`-specific would make Tier A permanently unreachable in every
341
+ * language, on every adapter, forever — a bar that cannot be measured is
342
+ * not a stricter gate, it is a broken one.
343
+ *
344
+ * But a tier resting on, say, an `IMPORTS`-only draw has not had its
345
+ * `USES_API` capability's precision independently sampled — `A.callers`
346
+ * checked that the edge type is *declared*, not that it is *precise*. That
347
+ * gap is real and belongs on the certificate, not silently absorbed into
348
+ * "Tier A". Printed rather than designed around, the same move as
349
+ * `unreachableHere`: the limit is disclosed, and a reader who wants to know
350
+ * whether the caller half specifically was adjudicated can see it named
351
+ * here instead of assuming "Tier A" answers a question it does not.
352
+ */
353
+ const attestedEdgeTypes = restsOnAttestation
354
+ ? [...new Set(evidence.precisionDraws.filter((d) => !d.authorChose).map((d) => d.edgeType))].sort()
355
+ : [];
356
+ return {
357
+ adapter: evidence.adapter,
358
+ language: evidence.language,
359
+ tier: awarded,
360
+ nextTier: above,
361
+ unmetForNext: above === null ? [] : byTier[above],
362
+ byTier,
363
+ attestedBy,
364
+ attestedEdgeTypes,
365
+ limitations: limits,
366
+ // Derived rather than declared: a zero population is measured, so unlike a
367
+ // StructuralLimit it needs no attribution to be admissible.
368
+ // Drawable zero, not population zero: a repository whose whole population is
369
+ // out of scope is as unreachable as one with no population at all, and both
370
+ // are facts about the corpus rather than about the adapter.
371
+ unreachableHere: evidence.precisionDraws
372
+ .filter((d) => drawableFrom(d) === 0)
373
+ .map((d) => ({ repository: d.repository, edgeType: d.edgeType })),
374
+ // Deliberately NOT folded into `limitedIds` above: a cap waives nothing, and
375
+ // a cap that could skip a requirement would be the cheapest route to a tier.
376
+ policyCaps: admissibleCaps(evidence),
377
+ capabilitiesHonest: capabilitiesHonest(evidence),
378
+ };
379
+ }
380
+ /**
381
+ * The certificate as a developer should read it: the tier, then immediately the
382
+ * reason it is not higher.
383
+ *
384
+ * The failing rows are not an appendix. A support matrix that prints "B" and
385
+ * stops teaches a reader that B is the ceiling; printing what A is missing
386
+ * turns the same fact into a work item.
387
+ */
388
+ export function formatCertificate(certificate) {
389
+ const lines = [];
390
+ const tier = certificate.tier ?? "none";
391
+ lines.push(`${certificate.language} — Tier ${tier} (${certificate.adapter})`);
392
+ if (certificate.attestedBy.length > 0) {
393
+ lines.push(` rests on a declaration by: ${certificate.attestedBy.join(", ")}`);
394
+ lines.push(` precision draw edge type(s) actually sampled: ${certificate.attestedEdgeTypes.join(", ")}`);
395
+ }
396
+ // Printed with the tier, never as a footnote. "We found nothing" and "we
397
+ // cannot check this in this language" are different sentences (§20.2), and
398
+ // this is the line that keeps them apart at the tier layer.
399
+ for (const limit of certificate.limitations) {
400
+ lines.push(` NOT AVAILABLE in this language — ${limit.id}: ${limit.reason}`);
401
+ lines.push(` declared by ${limit.declaredBy}; this is a language boundary, not an unbuilt feature`);
402
+ }
403
+ // A deliberate under-claim, printed beside the limits and worded so it cannot
404
+ // be read as one. "We cannot" and "we could and are not, yet" are different
405
+ // sentences, and publishing the second as the first understates the adapter.
406
+ // Beside the limitations, not among the unmet rows: "nothing to measure" and
407
+ // "measured and short" send a reader to different places.
408
+ for (const empty of certificate.unreachableHere) {
409
+ lines.push(` NOT REACHABLE IN THIS REFERENCE SET — ${empty.edgeType} on ${empty.repository}: population 0`);
410
+ lines.push(" Nothing here to sample. The remedy is other repositories, not more measurement");
411
+ }
412
+ for (const cap of certificate.policyCaps) {
413
+ lines.push(` CAPPED BY POLICY — ${cap.id}: claims ${cap.claimed}, evidence supports ${cap.claimable}`);
414
+ lines.push(` pending ${cap.pendingOn}; declared by ${cap.declaredBy}. Not a limit — a deliberate under-claim`);
415
+ }
416
+ if (certificate.capabilitiesHonest === false) {
417
+ lines.push(" WARNING: capabilities() declares types this run did not emit (DEC-075 §6.3)");
418
+ }
419
+ else if (certificate.capabilitiesHonest === "unknown") {
420
+ lines.push(" capabilities() not compared against a run — DEC-075 §6.3 unverified here");
421
+ }
422
+ if (certificate.nextTier === null) {
423
+ lines.push(" nothing above this tier");
424
+ return lines.join("\n");
425
+ }
426
+ lines.push(` not Tier ${certificate.nextTier}, because:`);
427
+ for (const unmet of certificate.unmetForNext) {
428
+ const mark = unmet.requirement.kind === "attested" ? " [declared, not measured]" : "";
429
+ lines.push(` - ${unmet.requirement.statement}${mark}`);
430
+ lines.push(` ${unmet.because}`);
431
+ }
432
+ return lines.join("\n");
433
+ }
434
+ //# sourceMappingURL=certify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"certify.js","sourceRoot":"","sources":["../../src/tiers/certify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAKH,OAAO,EAAE,MAAM,EAA+B,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAgV1F,8EAA8E;AAC9E,2BAA2B;AAC3B,8EAA8E;AAE9E,MAAM,QAAQ,GAAG,GAAG,CAAC;AACrB,MAAM,aAAa,GAAG,IAAI,CAAC;AAC3B,MAAM,WAAW,GAAG,IAAI,CAAC;AACzB;;;;;;;;;;GAUG;AACH,MAAM,UAAU,GAAG,EAAE,CAAC;AACtB,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEhC,SAAS,OAAO,CAAI,MAAgC,EAAE,IAAkB;IACtE,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACpC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,eAAe,CAAC,WAAwB,EAAE,QAAsB;IACvE,MAAM,IAAI,GAAG,QAAQ,CAAC,YAAY,CAAC;IACnC,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC;IAE/D,MAAM,OAAO,GAAG,OAAO,C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C,YAAY,EAAE,CAAC;QAC7C,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,CAAC;QACtF,KAAK,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,SAAS,GAAG,IAAI,EAAE,CAAC,CAAC;QAC1D,KAAK,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { certify, formatCertificate } from "./certify.ts";
2
+ export type { ConformanceEvidence, EmptyPopulation, GateEvidence, PolicyCap, PrecisionDraw, StructuralLimit, TierCertificate, UnmetRequirement, } from "./certify.ts";
3
+ export { LADDER, TIERS, requirementsFor } from "./ladder.ts";
4
+ export type { Requirement, RequirementKind, Tier, TierDefinition } from "./ladder.ts";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tiers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC1D,YAAY,EACV,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,SAAS,EACT,aAAa,EACb,eAAe,EACf,eAAe,EACf,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7D,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { certify, formatCertificate } from "./certify.js";
2
+ export { LADDER, TIERS, requirementsFor } from "./ladder.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tiers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAW1D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * The four capability tiers of §11A.11, expressed as requirements a machine can
3
+ * check — and the ones it cannot, named as such.
4
+ *
5
+ * ## Why this file exists at all
6
+ *
7
+ * Nine adapters state a tier in a doc comment. **DEC-075 §6 says a tier is
8
+ * generated from `capabilities()` and the gate results, never written in
9
+ * prose**, and until now nothing implemented that, so the only tier claims in
10
+ * the repository were the ones a human typed. That is the single piece of
11
+ * standing dishonesty in the codebase: a claim about what works for a language,
12
+ * made by the person who wanted it to be true, in a comment nothing checks.
13
+ *
14
+ * ## The ladder, from §11A.11
15
+ *
16
+ * | tier | what works | what it costs |
17
+ * | --- | --- | --- |
18
+ * | **S — Full** | contract *shape* matching, data propagation, oracle-derived tests | R3 + router extractor + ORM extractor |
19
+ * | **A — Contract** | endpoint matching, path-level orphans, migration DAG | R2/R3 + router extractor |
20
+ * | **B — Graph** | blast radius, impact scoring, test discovery, in-language root cause | R2 adapter |
21
+ * | **C — Signal** | env/config, rollback readiness, hidden dependency, file-level blast radius | R0, one grammar and one query set |
22
+ *
23
+ * A tier is **cumulative**: S implies A implies B implies C. So a language is
24
+ * awarded the highest tier whose requirements are *all* met, and the
25
+ * requirements of every tier below it are re-checked rather than assumed —
26
+ * because an adapter can reach R3 and still not emit a `FUNCTION`, and a ladder
27
+ * that assumed monotonicity would hand it an A on the strength of its routes.
28
+ *
29
+ * ## What a requirement may be
30
+ *
31
+ * Three kinds, and the split is the honest part:
32
+ *
33
+ * - **`capability`** — read straight off `capabilities()`. Machine-checked, no
34
+ * judgement. `capabilities()` is itself machine-checked against what the
35
+ * adapter actually emitted (DEC-070), so this is evidence, not a promise.
36
+ * - **`conformance`** — the corpus passes at the resolution the tier claims.
37
+ * Machine-checked by running the harness.
38
+ * - **`attested`** — a fact no machine in this repository can establish, so it
39
+ * is *declared* with its evidence and marked as declared. There is exactly
40
+ * one, and it is DEC-075's second condition: a ≥200-edge precision draw on
41
+ * two repositories **the adapter's author did not choose**. A machine can
42
+ * check the 200 and the two; it cannot check "did not choose", which is a
43
+ * fact about a person's intent. Recording it as attested is what stops the
44
+ * generator laundering a human judgement into a computed result.
45
+ */
46
+ import type { EdgeType, NodeType, ResolutionLevel } from "@descryy/ir";
47
+ export type Tier = "S" | "A" | "B" | "C";
48
+ /** Highest first. The order the generator walks, and the only place it lives. */
49
+ export declare const TIERS: readonly Tier[];
50
+ export type RequirementKind = "capability" | "conformance" | "attested";
51
+ export interface Requirement {
52
+ readonly id: string;
53
+ readonly kind: RequirementKind;
54
+ /** One sentence, phrased as the thing that must be true. Printed on failure. */
55
+ readonly statement: string;
56
+ readonly nodeTypes?: readonly NodeType[];
57
+ readonly edgeTypes?: readonly EdgeType[];
58
+ readonly minResolution?: ResolutionLevel;
59
+ }
60
+ export interface TierDefinition {
61
+ readonly tier: Tier;
62
+ readonly name: string;
63
+ readonly requires: readonly Requirement[];
64
+ }
65
+ export declare const LADDER: readonly TierDefinition[];
66
+ /**
67
+ * Every requirement a tier needs, including the tiers beneath it.
68
+ *
69
+ * Cumulative and re-checked rather than assumed — see the header. `C` is the
70
+ * floor, so `requirementsFor("C")` is C's own list.
71
+ */
72
+ export declare function requirementsFor(tier: Tier): readonly Requirement[];
73
+ //# sourceMappingURL=ladder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ladder.d.ts","sourceRoot":"","sources":["../../src/tiers/ladder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEvE,MAAM,MAAM,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEzC,iFAAiF;AACjF,eAAO,MAAM,KAAK,EAAE,SAAS,IAAI,EAAyB,CAAC;AAE3D,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CAAC;AAExE,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,gFAAgF;IAChF,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IACzC,QAAQ,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC;CAC1C;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;CAC3C;AAyID,eAAO,MAAM,MAAM,EAAE,SAAS,cAAc,EAK3C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,WAAW,EAAE,CAOlE"}