@ztothez/design-engineering 2.0.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 (513) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +448 -0
  3. package/ROADMAP.md +127 -0
  4. package/SKILL.md +698 -0
  5. package/V2-ROADMAP.md +431 -0
  6. package/V3-ROADMAP.md +605 -0
  7. package/V4-ROADMAP.md +283 -0
  8. package/clean-room-ux-design-spec.md +1431 -0
  9. package/dist/cli/aggregate-gates.d.ts +2 -0
  10. package/dist/cli/aggregate-gates.js +86 -0
  11. package/dist/cli/aggregate-gates.js.map +1 -0
  12. package/dist/cli/assess-maintainer-review.d.ts +2 -0
  13. package/dist/cli/assess-maintainer-review.js +72 -0
  14. package/dist/cli/assess-maintainer-review.js.map +1 -0
  15. package/dist/cli/audit.d.ts +2 -0
  16. package/dist/cli/audit.js +71 -0
  17. package/dist/cli/audit.js.map +1 -0
  18. package/dist/cli/compile-comparison-review.d.ts +2 -0
  19. package/dist/cli/compile-comparison-review.js +154 -0
  20. package/dist/cli/compile-comparison-review.js.map +1 -0
  21. package/dist/cli/compile-plan.d.ts +2 -0
  22. package/dist/cli/compile-plan.js +66 -0
  23. package/dist/cli/compile-plan.js.map +1 -0
  24. package/dist/cli/evaluate-corpus.d.ts +2 -0
  25. package/dist/cli/evaluate-corpus.js +65 -0
  26. package/dist/cli/evaluate-corpus.js.map +1 -0
  27. package/dist/cli/generate-react.d.ts +2 -0
  28. package/dist/cli/generate-react.js +83 -0
  29. package/dist/cli/generate-react.js.map +1 -0
  30. package/dist/cli/index.d.ts +2 -0
  31. package/dist/cli/index.js +58 -0
  32. package/dist/cli/index.js.map +1 -0
  33. package/dist/cli/portfolio.d.ts +2 -0
  34. package/dist/cli/portfolio.js +316 -0
  35. package/dist/cli/portfolio.js.map +1 -0
  36. package/dist/cli/quality-gate.d.ts +2 -0
  37. package/dist/cli/quality-gate.js +131 -0
  38. package/dist/cli/quality-gate.js.map +1 -0
  39. package/dist/cli/repair-react.d.ts +2 -0
  40. package/dist/cli/repair-react.js +163 -0
  41. package/dist/cli/repair-react.js.map +1 -0
  42. package/dist/cli/review-heuristics.d.ts +2 -0
  43. package/dist/cli/review-heuristics.js +68 -0
  44. package/dist/cli/review-heuristics.js.map +1 -0
  45. package/dist/cli/validate-brief.d.ts +2 -0
  46. package/dist/cli/validate-brief.js +58 -0
  47. package/dist/cli/validate-brief.js.map +1 -0
  48. package/dist/cli/validate-comparison.d.ts +2 -0
  49. package/dist/cli/validate-comparison.js +68 -0
  50. package/dist/cli/validate-comparison.js.map +1 -0
  51. package/dist/cli/validate-contract.d.ts +2 -0
  52. package/dist/cli/validate-contract.js +54 -0
  53. package/dist/cli/validate-contract.js.map +1 -0
  54. package/dist/cli/validate-design.d.ts +2 -0
  55. package/dist/cli/validate-design.js +53 -0
  56. package/dist/cli/validate-design.js.map +1 -0
  57. package/dist/cli/validate-information.d.ts +2 -0
  58. package/dist/cli/validate-information.js +53 -0
  59. package/dist/cli/validate-information.js.map +1 -0
  60. package/dist/cli/validate-trust.d.ts +2 -0
  61. package/dist/cli/validate-trust.js +53 -0
  62. package/dist/cli/validate-trust.js.map +1 -0
  63. package/dist/cli/verify-ui.d.ts +2 -0
  64. package/dist/cli/verify-ui.js +181 -0
  65. package/dist/cli/verify-ui.js.map +1 -0
  66. package/dist/src/acceptance/evaluator.d.ts +13 -0
  67. package/dist/src/acceptance/evaluator.js +201 -0
  68. package/dist/src/acceptance/evaluator.js.map +1 -0
  69. package/dist/src/acceptance/loader.d.ts +2 -0
  70. package/dist/src/acceptance/loader.js +18 -0
  71. package/dist/src/acceptance/loader.js.map +1 -0
  72. package/dist/src/acceptance/report.d.ts +2 -0
  73. package/dist/src/acceptance/report.js +18 -0
  74. package/dist/src/acceptance/report.js.map +1 -0
  75. package/dist/src/acceptance/schema.d.ts +64 -0
  76. package/dist/src/acceptance/schema.js +57 -0
  77. package/dist/src/acceptance/schema.js.map +1 -0
  78. package/dist/src/acceptance/types.d.ts +47 -0
  79. package/dist/src/acceptance/types.js +2 -0
  80. package/dist/src/acceptance/types.js.map +1 -0
  81. package/dist/src/aggregate/report.d.ts +2 -0
  82. package/dist/src/aggregate/report.js +33 -0
  83. package/dist/src/aggregate/report.js.map +1 -0
  84. package/dist/src/aggregate/runner.d.ts +2 -0
  85. package/dist/src/aggregate/runner.js +165 -0
  86. package/dist/src/aggregate/runner.js.map +1 -0
  87. package/dist/src/aggregate/schema.d.ts +182 -0
  88. package/dist/src/aggregate/schema.js +54 -0
  89. package/dist/src/aggregate/schema.js.map +1 -0
  90. package/dist/src/aggregate/types.d.ts +57 -0
  91. package/dist/src/aggregate/types.js +2 -0
  92. package/dist/src/aggregate/types.js.map +1 -0
  93. package/dist/src/audit/policy.d.ts +3 -0
  94. package/dist/src/audit/policy.js +45 -0
  95. package/dist/src/audit/policy.js.map +1 -0
  96. package/dist/src/audit/report.d.ts +2 -0
  97. package/dist/src/audit/report.js +32 -0
  98. package/dist/src/audit/report.js.map +1 -0
  99. package/dist/src/audit/rules/accessibility-name.d.ts +2 -0
  100. package/dist/src/audit/rules/accessibility-name.js +64 -0
  101. package/dist/src/audit/rules/accessibility-name.js.map +1 -0
  102. package/dist/src/audit/rules/component-size.d.ts +2 -0
  103. package/dist/src/audit/rules/component-size.js +27 -0
  104. package/dist/src/audit/rules/component-size.js.map +1 -0
  105. package/dist/src/audit/rules/credential-placeholder.d.ts +2 -0
  106. package/dist/src/audit/rules/credential-placeholder.js +83 -0
  107. package/dist/src/audit/rules/credential-placeholder.js.map +1 -0
  108. package/dist/src/audit/rules/helpers.d.ts +16 -0
  109. package/dist/src/audit/rules/helpers.js +64 -0
  110. package/dist/src/audit/rules/helpers.js.map +1 -0
  111. package/dist/src/audit/rules/index.d.ts +2 -0
  112. package/dist/src/audit/rules/index.js +23 -0
  113. package/dist/src/audit/rules/index.js.map +1 -0
  114. package/dist/src/audit/rules/interactive-integrity.d.ts +2 -0
  115. package/dist/src/audit/rules/interactive-integrity.js +111 -0
  116. package/dist/src/audit/rules/interactive-integrity.js.map +1 -0
  117. package/dist/src/audit/rules/mixed-responsibilities.d.ts +2 -0
  118. package/dist/src/audit/rules/mixed-responsibilities.js +39 -0
  119. package/dist/src/audit/rules/mixed-responsibilities.js.map +1 -0
  120. package/dist/src/audit/rules/mock-production-path.d.ts +2 -0
  121. package/dist/src/audit/rules/mock-production-path.js +39 -0
  122. package/dist/src/audit/rules/mock-production-path.js.map +1 -0
  123. package/dist/src/audit/rules/network-state.d.ts +2 -0
  124. package/dist/src/audit/rules/network-state.js +39 -0
  125. package/dist/src/audit/rules/network-state.js.map +1 -0
  126. package/dist/src/audit/rules/operational-claim.d.ts +2 -0
  127. package/dist/src/audit/rules/operational-claim.js +94 -0
  128. package/dist/src/audit/rules/operational-claim.js.map +1 -0
  129. package/dist/src/audit/rules/placeholder-interaction.d.ts +2 -0
  130. package/dist/src/audit/rules/placeholder-interaction.js +46 -0
  131. package/dist/src/audit/rules/placeholder-interaction.js.map +1 -0
  132. package/dist/src/audit/rules/raw-design-values.d.ts +2 -0
  133. package/dist/src/audit/rules/raw-design-values.js +97 -0
  134. package/dist/src/audit/rules/raw-design-values.js.map +1 -0
  135. package/dist/src/audit/scanner.d.ts +2 -0
  136. package/dist/src/audit/scanner.js +215 -0
  137. package/dist/src/audit/scanner.js.map +1 -0
  138. package/dist/src/audit/types.d.ts +62 -0
  139. package/dist/src/audit/types.js +2 -0
  140. package/dist/src/audit/types.js.map +1 -0
  141. package/dist/src/comparison/evaluator.d.ts +2 -0
  142. package/dist/src/comparison/evaluator.js +478 -0
  143. package/dist/src/comparison/evaluator.js.map +1 -0
  144. package/dist/src/comparison/loader.d.ts +3 -0
  145. package/dist/src/comparison/loader.js +26 -0
  146. package/dist/src/comparison/loader.js.map +1 -0
  147. package/dist/src/comparison/maintainer.d.ts +47 -0
  148. package/dist/src/comparison/maintainer.js +218 -0
  149. package/dist/src/comparison/maintainer.js.map +1 -0
  150. package/dist/src/comparison/report.d.ts +2 -0
  151. package/dist/src/comparison/report.js +48 -0
  152. package/dist/src/comparison/report.js.map +1 -0
  153. package/dist/src/comparison/schema.d.ts +464 -0
  154. package/dist/src/comparison/schema.js +502 -0
  155. package/dist/src/comparison/schema.js.map +1 -0
  156. package/dist/src/contracts/archetypes.d.ts +21 -0
  157. package/dist/src/contracts/archetypes.js +102 -0
  158. package/dist/src/contracts/archetypes.js.map +1 -0
  159. package/dist/src/contracts/journeys.d.ts +7 -0
  160. package/dist/src/contracts/journeys.js +32 -0
  161. package/dist/src/contracts/journeys.js.map +1 -0
  162. package/dist/src/contracts/report.d.ts +2 -0
  163. package/dist/src/contracts/report.js +33 -0
  164. package/dist/src/contracts/report.js.map +1 -0
  165. package/dist/src/contracts/schema.d.ts +1038 -0
  166. package/dist/src/contracts/schema.js +385 -0
  167. package/dist/src/contracts/schema.js.map +1 -0
  168. package/dist/src/contracts/validator.d.ts +12 -0
  169. package/dist/src/contracts/validator.js +303 -0
  170. package/dist/src/contracts/validator.js.map +1 -0
  171. package/dist/src/corpus/evaluator.d.ts +2 -0
  172. package/dist/src/corpus/evaluator.js +203 -0
  173. package/dist/src/corpus/evaluator.js.map +1 -0
  174. package/dist/src/corpus/loader.d.ts +2 -0
  175. package/dist/src/corpus/loader.js +20 -0
  176. package/dist/src/corpus/loader.js.map +1 -0
  177. package/dist/src/corpus/report.d.ts +2 -0
  178. package/dist/src/corpus/report.js +33 -0
  179. package/dist/src/corpus/report.js.map +1 -0
  180. package/dist/src/corpus/schema.d.ts +316 -0
  181. package/dist/src/corpus/schema.js +269 -0
  182. package/dist/src/corpus/schema.js.map +1 -0
  183. package/dist/src/design-intelligence/loader.d.ts +2 -0
  184. package/dist/src/design-intelligence/loader.js +21 -0
  185. package/dist/src/design-intelligence/loader.js.map +1 -0
  186. package/dist/src/design-intelligence/report.d.ts +2 -0
  187. package/dist/src/design-intelligence/report.js +36 -0
  188. package/dist/src/design-intelligence/report.js.map +1 -0
  189. package/dist/src/design-intelligence/schema.d.ts +838 -0
  190. package/dist/src/design-intelligence/schema.js +854 -0
  191. package/dist/src/design-intelligence/schema.js.map +1 -0
  192. package/dist/src/design-intelligence/validator.d.ts +2 -0
  193. package/dist/src/design-intelligence/validator.js +1371 -0
  194. package/dist/src/design-intelligence/validator.js.map +1 -0
  195. package/dist/src/design-plan/compiler.d.ts +8 -0
  196. package/dist/src/design-plan/compiler.js +288 -0
  197. package/dist/src/design-plan/compiler.js.map +1 -0
  198. package/dist/src/design-plan/report.d.ts +2 -0
  199. package/dist/src/design-plan/report.js +28 -0
  200. package/dist/src/design-plan/report.js.map +1 -0
  201. package/dist/src/design-plan/schema.d.ts +202 -0
  202. package/dist/src/design-plan/schema.js +76 -0
  203. package/dist/src/design-plan/schema.js.map +1 -0
  204. package/dist/src/generation/loader.d.ts +2 -0
  205. package/dist/src/generation/loader.js +21 -0
  206. package/dist/src/generation/loader.js.map +1 -0
  207. package/dist/src/generation/policy.d.ts +12 -0
  208. package/dist/src/generation/policy.js +62 -0
  209. package/dist/src/generation/policy.js.map +1 -0
  210. package/dist/src/generation/react-typescript.d.ts +6 -0
  211. package/dist/src/generation/react-typescript.js +538 -0
  212. package/dist/src/generation/react-typescript.js.map +1 -0
  213. package/dist/src/generation/report.d.ts +2 -0
  214. package/dist/src/generation/report.js +21 -0
  215. package/dist/src/generation/report.js.map +1 -0
  216. package/dist/src/generation/schema.d.ts +44 -0
  217. package/dist/src/generation/schema.js +50 -0
  218. package/dist/src/generation/schema.js.map +1 -0
  219. package/dist/src/generation/templates/tokens.d.ts +1 -0
  220. package/dist/src/generation/templates/tokens.js +59 -0
  221. package/dist/src/generation/templates/tokens.js.map +1 -0
  222. package/dist/src/heuristics/evaluator.d.ts +2 -0
  223. package/dist/src/heuristics/evaluator.js +65 -0
  224. package/dist/src/heuristics/evaluator.js.map +1 -0
  225. package/dist/src/heuristics/loader.d.ts +2 -0
  226. package/dist/src/heuristics/loader.js +21 -0
  227. package/dist/src/heuristics/loader.js.map +1 -0
  228. package/dist/src/heuristics/report.d.ts +3 -0
  229. package/dist/src/heuristics/report.js +31 -0
  230. package/dist/src/heuristics/report.js.map +1 -0
  231. package/dist/src/heuristics/schema.d.ts +198 -0
  232. package/dist/src/heuristics/schema.js +197 -0
  233. package/dist/src/heuristics/schema.js.map +1 -0
  234. package/dist/src/information-design/loader.d.ts +2 -0
  235. package/dist/src/information-design/loader.js +21 -0
  236. package/dist/src/information-design/loader.js.map +1 -0
  237. package/dist/src/information-design/report.d.ts +2 -0
  238. package/dist/src/information-design/report.js +27 -0
  239. package/dist/src/information-design/report.js.map +1 -0
  240. package/dist/src/information-design/schema.d.ts +370 -0
  241. package/dist/src/information-design/schema.js +329 -0
  242. package/dist/src/information-design/schema.js.map +1 -0
  243. package/dist/src/information-design/validator.d.ts +2 -0
  244. package/dist/src/information-design/validator.js +242 -0
  245. package/dist/src/information-design/validator.js.map +1 -0
  246. package/dist/src/interface-trust/loader.d.ts +2 -0
  247. package/dist/src/interface-trust/loader.js +21 -0
  248. package/dist/src/interface-trust/loader.js.map +1 -0
  249. package/dist/src/interface-trust/report.d.ts +2 -0
  250. package/dist/src/interface-trust/report.js +26 -0
  251. package/dist/src/interface-trust/report.js.map +1 -0
  252. package/dist/src/interface-trust/schema.d.ts +299 -0
  253. package/dist/src/interface-trust/schema.js +238 -0
  254. package/dist/src/interface-trust/schema.js.map +1 -0
  255. package/dist/src/interface-trust/validator.d.ts +2 -0
  256. package/dist/src/interface-trust/validator.js +283 -0
  257. package/dist/src/interface-trust/validator.js.map +1 -0
  258. package/dist/src/portfolio/adapter-report.d.ts +3 -0
  259. package/dist/src/portfolio/adapter-report.js +38 -0
  260. package/dist/src/portfolio/adapter-report.js.map +1 -0
  261. package/dist/src/portfolio/adapters.d.ts +37 -0
  262. package/dist/src/portfolio/adapters.js +325 -0
  263. package/dist/src/portfolio/adapters.js.map +1 -0
  264. package/dist/src/portfolio/evidence.d.ts +9 -0
  265. package/dist/src/portfolio/evidence.js +233 -0
  266. package/dist/src/portfolio/evidence.js.map +1 -0
  267. package/dist/src/portfolio/files.d.ts +8 -0
  268. package/dist/src/portfolio/files.js +77 -0
  269. package/dist/src/portfolio/files.js.map +1 -0
  270. package/dist/src/portfolio/fixture-server.d.ts +11 -0
  271. package/dist/src/portfolio/fixture-server.js +131 -0
  272. package/dist/src/portfolio/fixture-server.js.map +1 -0
  273. package/dist/src/portfolio/loader.d.ts +2 -0
  274. package/dist/src/portfolio/loader.js +21 -0
  275. package/dist/src/portfolio/loader.js.map +1 -0
  276. package/dist/src/portfolio/mcp.d.ts +186 -0
  277. package/dist/src/portfolio/mcp.js +117 -0
  278. package/dist/src/portfolio/mcp.js.map +1 -0
  279. package/dist/src/portfolio/promotion-schema.d.ts +220 -0
  280. package/dist/src/portfolio/promotion-schema.js +148 -0
  281. package/dist/src/portfolio/promotion-schema.js.map +1 -0
  282. package/dist/src/portfolio/promotion.d.ts +4 -0
  283. package/dist/src/portfolio/promotion.js +160 -0
  284. package/dist/src/portfolio/promotion.js.map +1 -0
  285. package/dist/src/portfolio/qualification-schema.d.ts +268 -0
  286. package/dist/src/portfolio/qualification-schema.js +112 -0
  287. package/dist/src/portfolio/qualification-schema.js.map +1 -0
  288. package/dist/src/portfolio/qualification.d.ts +4 -0
  289. package/dist/src/portfolio/qualification.js +157 -0
  290. package/dist/src/portfolio/qualification.js.map +1 -0
  291. package/dist/src/portfolio/registry.d.ts +34 -0
  292. package/dist/src/portfolio/registry.js +240 -0
  293. package/dist/src/portfolio/registry.js.map +1 -0
  294. package/dist/src/portfolio/report.d.ts +4 -0
  295. package/dist/src/portfolio/report.js +47 -0
  296. package/dist/src/portfolio/report.js.map +1 -0
  297. package/dist/src/portfolio/run-schema.d.ts +135 -0
  298. package/dist/src/portfolio/run-schema.js +81 -0
  299. package/dist/src/portfolio/run-schema.js.map +1 -0
  300. package/dist/src/portfolio/runner.d.ts +118 -0
  301. package/dist/src/portfolio/runner.js +423 -0
  302. package/dist/src/portfolio/runner.js.map +1 -0
  303. package/dist/src/portfolio/schema.d.ts +251 -0
  304. package/dist/src/portfolio/schema.js +317 -0
  305. package/dist/src/portfolio/schema.js.map +1 -0
  306. package/dist/src/portfolio/snapshot.d.ts +89 -0
  307. package/dist/src/portfolio/snapshot.js +548 -0
  308. package/dist/src/portfolio/snapshot.js.map +1 -0
  309. package/dist/src/portfolio/taxonomy-schema.d.ts +215 -0
  310. package/dist/src/portfolio/taxonomy-schema.js +74 -0
  311. package/dist/src/portfolio/taxonomy-schema.js.map +1 -0
  312. package/dist/src/portfolio/taxonomy.d.ts +5 -0
  313. package/dist/src/portfolio/taxonomy.js +236 -0
  314. package/dist/src/portfolio/taxonomy.js.map +1 -0
  315. package/dist/src/portfolio/vault.d.ts +53 -0
  316. package/dist/src/portfolio/vault.js +176 -0
  317. package/dist/src/portfolio/vault.js.map +1 -0
  318. package/dist/src/product-brief/loader.d.ts +2 -0
  319. package/dist/src/product-brief/loader.js +21 -0
  320. package/dist/src/product-brief/loader.js.map +1 -0
  321. package/dist/src/product-brief/report.d.ts +2 -0
  322. package/dist/src/product-brief/report.js +22 -0
  323. package/dist/src/product-brief/report.js.map +1 -0
  324. package/dist/src/product-brief/schema.d.ts +367 -0
  325. package/dist/src/product-brief/schema.js +272 -0
  326. package/dist/src/product-brief/schema.js.map +1 -0
  327. package/dist/src/product-brief/validator.d.ts +2 -0
  328. package/dist/src/product-brief/validator.js +251 -0
  329. package/dist/src/product-brief/validator.js.map +1 -0
  330. package/dist/src/product.d.ts +7 -0
  331. package/dist/src/product.js +28 -0
  332. package/dist/src/product.js.map +1 -0
  333. package/dist/src/quality-gate/report.d.ts +2 -0
  334. package/dist/src/quality-gate/report.js +46 -0
  335. package/dist/src/quality-gate/report.js.map +1 -0
  336. package/dist/src/quality-gate/runner.d.ts +2 -0
  337. package/dist/src/quality-gate/runner.js +175 -0
  338. package/dist/src/quality-gate/runner.js.map +1 -0
  339. package/dist/src/quality-gate/schema.d.ts +75 -0
  340. package/dist/src/quality-gate/schema.js +37 -0
  341. package/dist/src/quality-gate/schema.js.map +1 -0
  342. package/dist/src/quality-gate/types.d.ts +49 -0
  343. package/dist/src/quality-gate/types.js +2 -0
  344. package/dist/src/quality-gate/types.js.map +1 -0
  345. package/dist/src/repair/loader.d.ts +2 -0
  346. package/dist/src/repair/loader.js +11 -0
  347. package/dist/src/repair/loader.js.map +1 -0
  348. package/dist/src/repair/policy.d.ts +16 -0
  349. package/dist/src/repair/policy.js +65 -0
  350. package/dist/src/repair/policy.js.map +1 -0
  351. package/dist/src/repair/report.d.ts +2 -0
  352. package/dist/src/repair/report.js +32 -0
  353. package/dist/src/repair/report.js.map +1 -0
  354. package/dist/src/repair/runner.d.ts +17 -0
  355. package/dist/src/repair/runner.js +511 -0
  356. package/dist/src/repair/runner.js.map +1 -0
  357. package/dist/src/repair/schema.d.ts +264 -0
  358. package/dist/src/repair/schema.js +202 -0
  359. package/dist/src/repair/schema.js.map +1 -0
  360. package/dist/src/retrieval/report.d.ts +2 -0
  361. package/dist/src/retrieval/report.js +21 -0
  362. package/dist/src/retrieval/report.js.map +1 -0
  363. package/dist/src/retrieval/schema.d.ts +123 -0
  364. package/dist/src/retrieval/schema.js +77 -0
  365. package/dist/src/retrieval/schema.js.map +1 -0
  366. package/dist/src/retrieval/search.d.ts +26 -0
  367. package/dist/src/retrieval/search.js +415 -0
  368. package/dist/src/retrieval/search.js.map +1 -0
  369. package/dist/src/runtime/advanced-checks.d.ts +6 -0
  370. package/dist/src/runtime/advanced-checks.js +487 -0
  371. package/dist/src/runtime/advanced-checks.js.map +1 -0
  372. package/dist/src/runtime/composition-checks.d.ts +5 -0
  373. package/dist/src/runtime/composition-checks.js +307 -0
  374. package/dist/src/runtime/composition-checks.js.map +1 -0
  375. package/dist/src/runtime/interface-checks.d.ts +12 -0
  376. package/dist/src/runtime/interface-checks.js +224 -0
  377. package/dist/src/runtime/interface-checks.js.map +1 -0
  378. package/dist/src/runtime/policy.d.ts +13 -0
  379. package/dist/src/runtime/policy.js +97 -0
  380. package/dist/src/runtime/policy.js.map +1 -0
  381. package/dist/src/runtime/report.d.ts +2 -0
  382. package/dist/src/runtime/report.js +48 -0
  383. package/dist/src/runtime/report.js.map +1 -0
  384. package/dist/src/runtime/schema.d.ts +406 -0
  385. package/dist/src/runtime/schema.js +308 -0
  386. package/dist/src/runtime/schema.js.map +1 -0
  387. package/dist/src/runtime/types.d.ts +177 -0
  388. package/dist/src/runtime/types.js +2 -0
  389. package/dist/src/runtime/types.js.map +1 -0
  390. package/dist/src/runtime/verifier.d.ts +2 -0
  391. package/dist/src/runtime/verifier.js +1201 -0
  392. package/dist/src/runtime/verifier.js.map +1 -0
  393. package/dist/src/server.d.ts +2 -0
  394. package/dist/src/server.js +1352 -0
  395. package/dist/src/server.js.map +1 -0
  396. package/docs/installation.md +337 -0
  397. package/knowledge-base/INDEX.md +285 -0
  398. package/knowledge-base/benchmarks/aegisops/CALIBRATION.md +52 -0
  399. package/knowledge-base/benchmarks/aegisops/MANIFEST.md +56 -0
  400. package/knowledge-base/benchmarks/aegisops/SOURCE-EVIDENCE.md +45 -0
  401. package/knowledge-base/benchmarks/aegisops/acceptance-criteria.md +42 -0
  402. package/knowledge-base/benchmarks/aegisops/anti-patterns.md +19 -0
  403. package/knowledge-base/benchmarks/aegisops/attestations.template.yaml +3 -0
  404. package/knowledge-base/benchmarks/aegisops/attestations.yaml +115 -0
  405. package/knowledge-base/benchmarks/aegisops/journeys.json +91 -0
  406. package/knowledge-base/benchmarks/aegisops/product-contract.yaml +328 -0
  407. package/knowledge-base/benchmarks/azure-optimizer/SOURCE-EVIDENCE.md +26 -0
  408. package/knowledge-base/benchmarks/azure-optimizer/V2-IMPLEMENTATION.md +39 -0
  409. package/knowledge-base/benchmarks/azure-optimizer/acceptance-criteria.md +23 -0
  410. package/knowledge-base/benchmarks/azure-optimizer/anti-patterns.md +13 -0
  411. package/knowledge-base/benchmarks/azure-optimizer/journeys.json +88 -0
  412. package/knowledge-base/benchmarks/azure-optimizer/product-contract.yaml +216 -0
  413. package/knowledge-base/benchmarks/azure-optimizer/v2-human-review-methodology.yaml +171 -0
  414. package/knowledge-base/benchmarks/azure-optimizer/v2-journeys.json +139 -0
  415. package/knowledge-base/benchmarks/corpus/PROVENANCE.md +21 -0
  416. package/knowledge-base/benchmarks/corpus/README.md +30 -0
  417. package/knowledge-base/benchmarks/corpus/cases/anti-slop-negative/package.json +9 -0
  418. package/knowledge-base/benchmarks/corpus/cases/anti-slop-negative/src/FakeDashboard.tsx +10 -0
  419. package/knowledge-base/benchmarks/corpus/cases/anti-slop-positive/package.json +9 -0
  420. package/knowledge-base/benchmarks/corpus/cases/anti-slop-positive/src/Progress.tsx +15 -0
  421. package/knowledge-base/benchmarks/corpus/cases/architecture-negative/package.json +9 -0
  422. package/knowledge-base/benchmarks/corpus/cases/architecture-negative/src/OperationsPanel.tsx +40 -0
  423. package/knowledge-base/benchmarks/corpus/cases/architecture-positive/package.json +9 -0
  424. package/knowledge-base/benchmarks/corpus/cases/architecture-positive/src/Dashboard.tsx +17 -0
  425. package/knowledge-base/benchmarks/corpus/cases/architecture-positive/src/theme.css +15 -0
  426. package/knowledge-base/benchmarks/corpus/cases/task-incomplete/SOURCE-EVIDENCE.md +3 -0
  427. package/knowledge-base/benchmarks/corpus/cases/task-incomplete/journeys.json +20 -0
  428. package/knowledge-base/benchmarks/corpus/cases/task-incomplete/product-contract.yaml +78 -0
  429. package/knowledge-base/benchmarks/corpus/corpus.schema.yaml +159 -0
  430. package/knowledge-base/benchmarks/corpus/corpus.yaml +209 -0
  431. package/knowledge-base/benchmarks/interface-quality/README.md +26 -0
  432. package/knowledge-base/benchmarks/interface-quality/SOLO-MAINTAINER-TRACK.md +35 -0
  433. package/knowledge-base/benchmarks/interface-quality/comparison-methodology-v1.1.schema.yaml +288 -0
  434. package/knowledge-base/benchmarks/interface-quality/comparison-methodology.schema.yaml +235 -0
  435. package/knowledge-base/benchmarks/interface-quality/comparison-methodology.template.yaml +181 -0
  436. package/knowledge-base/benchmarks/interface-quality/evidence/example-runtime-report.json +11 -0
  437. package/knowledge-base/benchmarks/interface-quality/review-session.schema.yaml +14 -0
  438. package/knowledge-base/benchmarks/interface-quality/review.schema.yaml +296 -0
  439. package/knowledge-base/benchmarks/interface-quality/review.template.yaml +43 -0
  440. package/knowledge-base/benchmarks/portfolio-corpus/ADAPTERS.md +68 -0
  441. package/knowledge-base/benchmarks/portfolio-corpus/PORTFOLIO-RUNNER.md +131 -0
  442. package/knowledge-base/benchmarks/portfolio-corpus/PRODUCT-TASK-CONTRACTS.md +29 -0
  443. package/knowledge-base/benchmarks/portfolio-corpus/PROMOTED-RULES.md +31 -0
  444. package/knowledge-base/benchmarks/portfolio-corpus/archetype-profiles.yaml +26 -0
  445. package/knowledge-base/benchmarks/portfolio-corpus/product-task-profile.schema.yaml +105 -0
  446. package/knowledge-base/benchmarks/portfolio-corpus/registry.schema.yaml +188 -0
  447. package/knowledge-base/benchmarks/portfolio-corpus/registry.template.yaml +63 -0
  448. package/knowledge-base/benchmarks/portfolio-corpus/rule-fixtures/component-size-abstention.json +10 -0
  449. package/knowledge-base/benchmarks/portfolio-corpus/rule-fixtures/component-size-negative.json +10 -0
  450. package/knowledge-base/benchmarks/portfolio-corpus/rule-fixtures/component-size-positive.json +10 -0
  451. package/knowledge-base/benchmarks/portfolio-corpus/rule-fixtures/interactive-integrity-abstention.json +10 -0
  452. package/knowledge-base/benchmarks/portfolio-corpus/rule-fixtures/interactive-integrity-negative.json +10 -0
  453. package/knowledge-base/benchmarks/portfolio-corpus/rule-fixtures/interactive-integrity-positive.json +10 -0
  454. package/knowledge-base/benchmarks/portfolio-corpus/rule-fixtures/raw-design-values-abstention.json +10 -0
  455. package/knowledge-base/benchmarks/portfolio-corpus/rule-fixtures/raw-design-values-negative.json +10 -0
  456. package/knowledge-base/benchmarks/portfolio-corpus/rule-fixtures/raw-design-values-positive.json +10 -0
  457. package/knowledge-base/benchmarks/portfolio-corpus/rule-holdout-evaluation.template.json +14 -0
  458. package/knowledge-base/benchmarks/portfolio-corpus/rule-promotion-evidence.template.json +24 -0
  459. package/knowledge-base/benchmarks/portfolio-corpus/v3-command-evidence.template.json +17 -0
  460. package/knowledge-base/benchmarks/portfolio-corpus/v3-qualification-evidence.template.json +29 -0
  461. package/knowledge-base/benchmarks/scenestart/CALIBRATION.md +95 -0
  462. package/knowledge-base/benchmarks/scenestart/MANIFEST.md +53 -0
  463. package/knowledge-base/benchmarks/scenestart/SOURCE-EVIDENCE.md +43 -0
  464. package/knowledge-base/benchmarks/scenestart/acceptance-criteria.md +59 -0
  465. package/knowledge-base/benchmarks/scenestart/anti-patterns.md +26 -0
  466. package/knowledge-base/benchmarks/scenestart/attestations.template.yaml +3 -0
  467. package/knowledge-base/benchmarks/scenestart/attestations.yaml +21 -0
  468. package/knowledge-base/benchmarks/scenestart/human-review.md +99 -0
  469. package/knowledge-base/benchmarks/scenestart/human-review.template.md +105 -0
  470. package/knowledge-base/benchmarks/scenestart/journeys.json +141 -0
  471. package/knowledge-base/benchmarks/scenestart/product-contract.yaml +427 -0
  472. package/knowledge-base/dependencies.yaml +69 -0
  473. package/knowledge-base/design-intelligence/MASTER.md +87 -0
  474. package/knowledge-base/design-intelligence/asset-generation.md +66 -0
  475. package/knowledge-base/design-intelligence/brand-systems.md +69 -0
  476. package/knowledge-base/design-intelligence/closed-loop-repair.md +95 -0
  477. package/knowledge-base/design-intelligence/design-deliverable.schema.yaml +1194 -0
  478. package/knowledge-base/design-intelligence/design-deliverable.template.yaml +591 -0
  479. package/knowledge-base/design-intelligence/design-plan.md +78 -0
  480. package/knowledge-base/design-intelligence/design-plan.schema.yaml +621 -0
  481. package/knowledge-base/design-intelligence/figma-production.md +63 -0
  482. package/knowledge-base/design-intelligence/generation-adapter.md +72 -0
  483. package/knowledge-base/design-intelligence/generation-adapter.schema.yaml +47 -0
  484. package/knowledge-base/design-intelligence/iconography.md +46 -0
  485. package/knowledge-base/design-intelligence/information-design.md +104 -0
  486. package/knowledge-base/design-intelligence/information-design.schema.yaml +390 -0
  487. package/knowledge-base/design-intelligence/information-design.template.yaml +281 -0
  488. package/knowledge-base/design-intelligence/interaction-recovery-verification.md +72 -0
  489. package/knowledge-base/design-intelligence/interface-trust.md +103 -0
  490. package/knowledge-base/design-intelligence/interface-trust.schema.yaml +263 -0
  491. package/knowledge-base/design-intelligence/interface-trust.template.yaml +173 -0
  492. package/knowledge-base/design-intelligence/licensing-and-provenance.md +59 -0
  493. package/knowledge-base/design-intelligence/presentation-design.md +56 -0
  494. package/knowledge-base/design-intelligence/product-design-brief.md +67 -0
  495. package/knowledge-base/design-intelligence/product-design-brief.schema.yaml +279 -0
  496. package/knowledge-base/design-intelligence/product-design-brief.template.yaml +225 -0
  497. package/knowledge-base/design-intelligence/repair-request.schema.yaml +95 -0
  498. package/knowledge-base/design-intelligence/repair-request.template.yaml +39 -0
  499. package/knowledge-base/design-intelligence/visual-accessibility.md +56 -0
  500. package/knowledge-base/design-intelligence/visual-polish.md +172 -0
  501. package/knowledge-base/maintained/architecture/MASTER.md +22 -0
  502. package/knowledge-base/maintained/architecture/component-boundaries.md +30 -0
  503. package/knowledge-base/maintained/architecture/product-platforms.md +25 -0
  504. package/knowledge-base/maintained/architecture/quality-attributes-and-evaluation.md +35 -0
  505. package/knowledge-base/maintained/product-patterns/MASTER.md +10 -0
  506. package/knowledge-base/maintained/product-patterns/ai-workspaces.md +26 -0
  507. package/knowledge-base/maintained/product-patterns/operational-dashboards.md +22 -0
  508. package/knowledge-base/provenance.yaml +196 -0
  509. package/knowledge-base/retrieval-scope.yaml +43 -0
  510. package/knowledge-base/usability-evaluation/HEURISTIC_EVALUATION.md +115 -0
  511. package/knowledge-base/usability-evaluation/heuristic-review.schema.yaml +210 -0
  512. package/knowledge-base/usability-evaluation/heuristic-review.template.yaml +37 -0
  513. package/package.json +133 -0
@@ -0,0 +1,854 @@
1
+ import { z } from "zod";
2
+ const idSchema = z.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/);
3
+ const tokenNameSchema = z.string().regex(/^[a-z][a-z0-9-]*(?:[.][a-z0-9][a-z0-9-]*)+$/);
4
+ const boundedText = (maximum) => z.string().trim().min(1).max(maximum);
5
+ const pathText = boundedText(1_024);
6
+ export const deliverableKindSchema = z.enum([
7
+ "interface-system",
8
+ "brand-system",
9
+ "figma-library",
10
+ "asset-set",
11
+ "icon-system",
12
+ "presentation",
13
+ ]);
14
+ const requiredViewportSchema = z.union([
15
+ z.literal(375),
16
+ z.literal(768),
17
+ z.literal(1024),
18
+ z.literal(1440),
19
+ ]);
20
+ export const generationStageSchema = z.enum([
21
+ "product-task",
22
+ "truth-data-source-contract",
23
+ "information-architecture",
24
+ "interaction-state-model",
25
+ "visual-direction",
26
+ "token-architecture",
27
+ "implementation",
28
+ "automated-verification",
29
+ "human-visual-review",
30
+ ]);
31
+ const contractStatusSchema = z.enum(["declared", "validated"]);
32
+ const productTaskSchema = z
33
+ .object({
34
+ productContractId: idSchema,
35
+ contractPath: pathText,
36
+ primaryUser: boundedText(256),
37
+ task: boundedText(1_024),
38
+ successCriteria: z.array(boundedText(512)).min(1).max(30),
39
+ consequentialActions: z.array(boundedText(512)).max(30),
40
+ })
41
+ .strict();
42
+ const interfaceTrustLinkSchema = z
43
+ .object({
44
+ contractId: idSchema,
45
+ contractPath: pathText,
46
+ version: z.literal("1.0"),
47
+ status: contractStatusSchema,
48
+ requiredScenarios: z
49
+ .array(z.enum(["demo", "live", "fallback", "stale", "disconnected"]))
50
+ .length(5),
51
+ reportPath: pathText.optional(),
52
+ evidenceRef: idSchema.optional(),
53
+ })
54
+ .strict();
55
+ const informationHierarchyLinkSchema = z
56
+ .object({
57
+ contractId: idSchema,
58
+ contractPath: pathText,
59
+ version: z.literal("1.0"),
60
+ status: contractStatusSchema,
61
+ levels: z
62
+ .array(z.enum([
63
+ "context-provenance",
64
+ "primary-outcome-action",
65
+ "critical-exceptions",
66
+ "health-impact-metrics",
67
+ "prioritized-findings",
68
+ "operational-telemetry",
69
+ "evidence-audit-trail",
70
+ "history-exports",
71
+ ]))
72
+ .length(8),
73
+ reportPath: pathText.optional(),
74
+ evidenceRef: idSchema.optional(),
75
+ })
76
+ .strict();
77
+ const metricContractsSchema = z
78
+ .object({
79
+ informationContractId: idSchema,
80
+ metrics: z
81
+ .array(z
82
+ .object({
83
+ metricId: idSchema,
84
+ decision: boundedText(512),
85
+ hierarchyLevel: z.enum([
86
+ "primary-outcome-action",
87
+ "health-impact-metrics",
88
+ "operational-telemetry",
89
+ ]),
90
+ chartRefs: z.array(idSchema).max(50),
91
+ })
92
+ .strict())
93
+ .min(1)
94
+ .max(5_000),
95
+ })
96
+ .strict();
97
+ const generationWorkflowSchema = z
98
+ .object({
99
+ steps: z
100
+ .array(z
101
+ .object({
102
+ stage: generationStageSchema,
103
+ status: z.enum([
104
+ "required",
105
+ "declared",
106
+ "implemented",
107
+ "verified",
108
+ "review-required",
109
+ "review-completed",
110
+ ]),
111
+ artifactRefs: z.array(idSchema).max(100),
112
+ })
113
+ .strict())
114
+ .length(9),
115
+ })
116
+ .strict();
117
+ const visualDirectionSchema = z
118
+ .object({
119
+ domain: boundedText(256),
120
+ intent: boundedText(1_024),
121
+ principles: z.array(boundedText(256)).min(3).max(8),
122
+ avoid: z.array(boundedText(256)).min(3).max(16),
123
+ tokenRefs: z.array(tokenNameSchema).min(4).max(100),
124
+ ornamentPolicy: z
125
+ .object({
126
+ decorativeAgentDiagrams: z.literal(false),
127
+ excessiveGlow: z.literal(false),
128
+ meaninglessGradients: z.literal(false),
129
+ ornamentalStatusElements: z.literal(false),
130
+ })
131
+ .strict(),
132
+ referenceEvidenceRefs: z.array(idSchema).max(50),
133
+ })
134
+ .strict();
135
+ const typographySchema = z
136
+ .object({
137
+ minimumBodySizePx: z.number().min(16).max(32),
138
+ maximumLineLengthCharacters: z.number().int().min(45).max(90),
139
+ numericAlignment: z.enum(["tabular", "proportional"]),
140
+ roles: z
141
+ .array(z
142
+ .object({
143
+ role: z.enum(["body", "label", "heading", "metadata", "metric", "evidence", "log", "code"]),
144
+ familyToken: tokenNameSchema,
145
+ sizeToken: tokenNameSchema,
146
+ weightToken: tokenNameSchema,
147
+ lineHeightToken: tokenNameSchema,
148
+ colorToken: tokenNameSchema,
149
+ usage: boundedText(512),
150
+ })
151
+ .strict())
152
+ .length(8),
153
+ })
154
+ .strict();
155
+ const compositionSchema = z
156
+ .object({
157
+ contentWidth: z
158
+ .object({
159
+ strategy: z.enum(["fluid", "bounded", "hybrid"]),
160
+ maximumPx: z.number().int().min(320).max(2_560),
161
+ })
162
+ .strict(),
163
+ grids: z
164
+ .array(z
165
+ .object({
166
+ viewport: requiredViewportSchema,
167
+ columns: z.number().int().min(1).max(16),
168
+ gutterToken: tokenNameSchema,
169
+ marginToken: tokenNameSchema,
170
+ composition: boundedText(512),
171
+ })
172
+ .strict())
173
+ .length(4),
174
+ spacingRhythm: z
175
+ .object({
176
+ baseToken: tokenNameSchema,
177
+ allowedStepTokens: z.array(tokenNameSchema).min(4).max(16),
178
+ })
179
+ .strict(),
180
+ alignmentRules: z.array(boundedText(512)).min(2).max(12),
181
+ stableDimensions: z
182
+ .array(z
183
+ .object({
184
+ component: idSchema,
185
+ behavior: z.enum(["fixed", "bounded", "aspect-ratio"]),
186
+ tokenRefs: z.array(tokenNameSchema).min(1).max(10),
187
+ rationale: boundedText(512),
188
+ })
189
+ .strict())
190
+ .min(1)
191
+ .max(100),
192
+ surfaces: z
193
+ .array(z
194
+ .object({
195
+ role: z.enum(["canvas", "subtle", "raised", "overlay", "inverse"]),
196
+ tokenRef: tokenNameSchema,
197
+ })
198
+ .strict())
199
+ .min(3)
200
+ .max(5),
201
+ borders: z
202
+ .array(z
203
+ .object({
204
+ role: z.enum(["default", "strong", "focus", "selected"]),
205
+ tokenRef: tokenNameSchema,
206
+ })
207
+ .strict())
208
+ .length(4),
209
+ elevations: z
210
+ .array(z
211
+ .object({
212
+ role: z.enum(["base", "raised", "overlay"]),
213
+ tokenRef: tokenNameSchema,
214
+ })
215
+ .strict())
216
+ .length(3),
217
+ emphasis: z
218
+ .array(z
219
+ .object({
220
+ level: z.enum(["primary", "secondary", "tertiary", "muted"]),
221
+ textToken: tokenNameSchema,
222
+ surfaceToken: tokenNameSchema,
223
+ })
224
+ .strict())
225
+ .length(4),
226
+ selectedState: z
227
+ .object({
228
+ backgroundToken: tokenNameSchema,
229
+ borderToken: tokenNameSchema,
230
+ indicator: boundedText(256),
231
+ nonColorCue: boundedText(256),
232
+ })
233
+ .strict(),
234
+ })
235
+ .strict();
236
+ const densityPriorityRoleSchema = z.enum([
237
+ "context",
238
+ "primary-outcome",
239
+ "critical-exceptions",
240
+ "impact",
241
+ "next-action",
242
+ "supporting-metrics",
243
+ "findings",
244
+ "telemetry",
245
+ "evidence",
246
+ "history",
247
+ ]);
248
+ const densityProfileSchema = z
249
+ .object({
250
+ mode: z.enum(["comfortable", "compact", "dense", "adaptive"]),
251
+ rationale: boundedText(1_024),
252
+ controlHeightToken: tokenNameSchema,
253
+ rowHeightToken: tokenNameSchema,
254
+ compactRowHeightToken: tokenNameSchema,
255
+ spacingTokenRefs: z.array(tokenNameSchema).min(4).max(16),
256
+ maximumPrimaryActions: z.number().int().min(1).max(3),
257
+ viewportBehavior: z
258
+ .array(z
259
+ .object({
260
+ viewport: requiredViewportSchema,
261
+ mode: z.enum(["comfortable", "compact", "dense"]),
262
+ visiblePriorities: z.array(boundedText(160)).min(1).max(8),
263
+ priorityRoles: z.array(densityPriorityRoleSchema).min(1).max(8).optional(),
264
+ })
265
+ .strict())
266
+ .length(4),
267
+ })
268
+ .strict();
269
+ const interactionStateSchema = z
270
+ .object({
271
+ states: z
272
+ .array(z
273
+ .object({
274
+ state: z.enum(["loading", "empty", "success", "warning", "error", "partial", "disabled", "selected", "focus"]),
275
+ behavior: boundedText(512),
276
+ tokenRefs: z.array(tokenNameSchema).min(1).max(20),
277
+ textCue: z.boolean(),
278
+ iconCue: z.boolean(),
279
+ })
280
+ .strict())
281
+ .length(9),
282
+ })
283
+ .strict();
284
+ const motionSchema = z
285
+ .object({
286
+ durationTokens: z
287
+ .object({
288
+ instant: tokenNameSchema,
289
+ feedback: tokenNameSchema,
290
+ transition: tokenNameSchema,
291
+ emphasis: tokenNameSchema,
292
+ })
293
+ .strict(),
294
+ motions: z
295
+ .array(z
296
+ .object({
297
+ id: idSchema,
298
+ purpose: boundedText(512),
299
+ trigger: boundedText(256),
300
+ property: z.enum(["opacity", "transform", "color", "size", "position", "progress"]),
301
+ durationCategory: z.enum(["instant", "feedback", "transition", "emphasis"]),
302
+ interruptible: z.boolean(),
303
+ })
304
+ .strict())
305
+ .min(1)
306
+ .max(100),
307
+ reducedMotion: z
308
+ .object({
309
+ strategy: z.enum(["remove", "replace", "shorten"]),
310
+ equivalents: z
311
+ .array(z
312
+ .object({
313
+ motionRef: idSchema,
314
+ behavior: boundedText(512),
315
+ })
316
+ .strict())
317
+ .min(1)
318
+ .max(100),
319
+ })
320
+ .strict(),
321
+ })
322
+ .strict();
323
+ const chartContractSchema = z
324
+ .object({
325
+ id: idSchema,
326
+ purpose: boundedText(1_024),
327
+ type: z.enum(["bar", "line", "area", "scatter", "distribution", "timeline", "table-first"]),
328
+ metricRefs: z.array(idSchema).min(1).max(50),
329
+ labelStrategy: z.enum(["direct", "axis-and-legend", "table-first"]),
330
+ titleVisible: z.boolean(),
331
+ valuesVisible: z.boolean(),
332
+ legend: z
333
+ .object({
334
+ visible: z.boolean(),
335
+ reason: boundedText(512).optional(),
336
+ })
337
+ .strict(),
338
+ comparison: z.discriminatedUnion("status", [
339
+ z.object({ status: z.literal("available"), context: boundedText(512) }).strict(),
340
+ z.object({ status: z.literal("not-applicable"), reason: boundedText(512) }).strict(),
341
+ ]),
342
+ alternative: z
343
+ .object({
344
+ kind: z.enum(["table", "text"]),
345
+ path: pathText,
346
+ })
347
+ .strict(),
348
+ states: z
349
+ .object({
350
+ loading: boundedText(512),
351
+ empty: boundedText(512),
352
+ partial: boundedText(512),
353
+ error: boundedText(512),
354
+ })
355
+ .strict(),
356
+ tokenRefs: z.array(tokenNameSchema).min(2).max(30),
357
+ backgroundToken: tokenNameSchema.optional(),
358
+ nonColorCues: z
359
+ .array(z.enum(["color", "text", "icon", "shape", "pattern", "position", "value", "line-style"]))
360
+ .min(2)
361
+ .max(8),
362
+ decorative: z.literal(false),
363
+ })
364
+ .strict();
365
+ const renderedEvidenceSchema = z
366
+ .object({
367
+ fixture: z
368
+ .object({
369
+ id: idSchema,
370
+ sourcePath: pathText,
371
+ route: boundedText(1_024),
372
+ })
373
+ .strict(),
374
+ captures: z
375
+ .array(z.discriminatedUnion("status", [
376
+ z
377
+ .object({
378
+ viewport: requiredViewportSchema,
379
+ status: z.literal("planned"),
380
+ })
381
+ .strict(),
382
+ z
383
+ .object({
384
+ viewport: requiredViewportSchema,
385
+ status: z.enum(["captured", "verified"]),
386
+ screenshotPath: pathText,
387
+ runtimeReportPath: pathText,
388
+ sha256: z.string().regex(/^[a-f0-9]{64}$/),
389
+ })
390
+ .strict(),
391
+ ]))
392
+ .length(4),
393
+ })
394
+ .strict();
395
+ const humanVisualReviewSchema = z
396
+ .object({
397
+ status: z.enum(["required", "completed"]),
398
+ dimensions: z
399
+ .array(z.enum(["hierarchy", "balance", "scanability", "density", "domain-fit"]))
400
+ .length(5),
401
+ reviewers: z
402
+ .array(z
403
+ .object({
404
+ name: boundedText(256),
405
+ role: boundedText(256),
406
+ reviewedAt: z.string().datetime({ offset: true }),
407
+ evidenceRef: idSchema,
408
+ })
409
+ .strict())
410
+ .max(50),
411
+ })
412
+ .strict();
413
+ const tokenSchema = z
414
+ .object({
415
+ name: tokenNameSchema,
416
+ type: z.enum(["color", "dimension", "font-family", "font-weight", "duration", "number", "shadow"]),
417
+ level: z.enum(["primitive", "semantic", "component"]),
418
+ value: z.union([z.string(), z.number()]).optional(),
419
+ reference: tokenNameSchema.optional(),
420
+ description: boundedText(512),
421
+ })
422
+ .strict()
423
+ .superRefine((token, context) => {
424
+ if (token.level === "primitive") {
425
+ if (token.value === undefined) {
426
+ context.addIssue({ code: "custom", path: ["value"], message: "Primitive tokens require a value." });
427
+ }
428
+ if (token.reference !== undefined) {
429
+ context.addIssue({ code: "custom", path: ["reference"], message: "Primitive tokens cannot reference another token." });
430
+ }
431
+ }
432
+ else {
433
+ if (token.reference === undefined) {
434
+ context.addIssue({ code: "custom", path: ["reference"], message: "Semantic and component tokens require a reference." });
435
+ }
436
+ if (token.value !== undefined) {
437
+ context.addIssue({ code: "custom", path: ["value"], message: "Semantic and component tokens cannot contain raw values." });
438
+ }
439
+ }
440
+ if (token.type === "color" &&
441
+ token.value !== undefined &&
442
+ (typeof token.value !== "string" || !/^#[0-9a-f]{6}$/i.test(token.value))) {
443
+ context.addIssue({
444
+ code: "custom",
445
+ path: ["value"],
446
+ message: "Color token values must be opaque six-digit hexadecimal colors.",
447
+ });
448
+ }
449
+ });
450
+ const tokenModeSchema = z
451
+ .object({
452
+ name: idSchema,
453
+ overrides: z
454
+ .array(z
455
+ .object({
456
+ token: tokenNameSchema,
457
+ value: z.union([z.string(), z.number()]).optional(),
458
+ reference: tokenNameSchema.optional(),
459
+ })
460
+ .strict()
461
+ .refine((override) => (override.value === undefined) !== (override.reference === undefined), {
462
+ message: "A mode override requires exactly one of value or reference.",
463
+ }))
464
+ .min(1)
465
+ .max(2_000),
466
+ })
467
+ .strict();
468
+ const brandSchema = z
469
+ .object({
470
+ promise: boundedText(512),
471
+ audiences: z.array(boundedText(256)).min(1).max(20),
472
+ attributes: z.array(boundedText(80)).min(2).max(8),
473
+ avoid: z.array(boundedText(160)).min(1).max(12),
474
+ voicePrinciples: z.array(boundedText(256)).min(2).max(12),
475
+ marks: z
476
+ .array(z
477
+ .object({
478
+ id: idSchema,
479
+ role: z.enum(["primary", "compact", "monochrome", "symbol", "wordmark"]),
480
+ asset: idSchema,
481
+ clearSpace: boundedText(256),
482
+ minimumSize: boundedText(256),
483
+ allowedBackgrounds: z.array(boundedText(128)).min(1).max(12),
484
+ })
485
+ .strict())
486
+ .min(1)
487
+ .max(30),
488
+ })
489
+ .strict();
490
+ const figmaSchema = z
491
+ .object({
492
+ pages: z
493
+ .array(z
494
+ .object({
495
+ name: boundedText(128),
496
+ role: z.enum([
497
+ "cover",
498
+ "foundations",
499
+ "components",
500
+ "patterns",
501
+ "templates",
502
+ "sandbox",
503
+ "archive",
504
+ ]),
505
+ purpose: boundedText(512),
506
+ })
507
+ .strict())
508
+ .min(2)
509
+ .max(50),
510
+ collections: z
511
+ .array(z
512
+ .object({
513
+ name: boundedText(128),
514
+ modes: z.array(idSchema).min(1).max(20),
515
+ tokens: z.array(tokenNameSchema).min(1).max(5_000),
516
+ })
517
+ .strict())
518
+ .min(1)
519
+ .max(100),
520
+ components: z
521
+ .array(z
522
+ .object({
523
+ name: boundedText(160),
524
+ purpose: boundedText(512),
525
+ interactive: z.boolean(),
526
+ properties: z
527
+ .array(z
528
+ .object({
529
+ name: boundedText(128),
530
+ type: z.enum(["boolean", "instance-swap", "text", "variant", "slot"]),
531
+ })
532
+ .strict())
533
+ .max(40),
534
+ states: z.array(idSchema).min(1).max(30),
535
+ documented: z.boolean(),
536
+ })
537
+ .strict())
538
+ .min(1)
539
+ .max(1_000),
540
+ })
541
+ .strict();
542
+ const assetSchema = z
543
+ .object({
544
+ id: idSchema,
545
+ purpose: boundedText(1_024).optional(),
546
+ kind: z.enum([
547
+ "logo",
548
+ "icon",
549
+ "illustration",
550
+ "photo",
551
+ "texture",
552
+ "chart",
553
+ "screenshot",
554
+ "video",
555
+ "audio",
556
+ "font",
557
+ ]),
558
+ path: pathText,
559
+ source: z
560
+ .object({
561
+ origin: z.enum([
562
+ "original",
563
+ "user-provided",
564
+ "generated",
565
+ "commissioned",
566
+ "licensed",
567
+ "open-source",
568
+ "public-domain",
569
+ ]),
570
+ creator: boundedText(256),
571
+ sourceUrl: z.string().url().optional(),
572
+ })
573
+ .strict(),
574
+ rights: z
575
+ .object({
576
+ status: z.enum(["approved", "pending", "rejected", "unknown"]),
577
+ basis: z.enum([
578
+ "owned",
579
+ "contract",
580
+ "terms-of-service",
581
+ "spdx-license",
582
+ "public-domain",
583
+ "permission",
584
+ ]),
585
+ spdxExpression: boundedText(256).optional(),
586
+ evidence: pathText.optional(),
587
+ attribution: boundedText(1_024).optional(),
588
+ restrictions: z.array(boundedText(512)).max(30).default([]),
589
+ reviewedBy: boundedText(256).optional(),
590
+ reviewedAt: z.string().datetime({ offset: true }).optional(),
591
+ })
592
+ .strict(),
593
+ generation: z
594
+ .object({
595
+ provider: boundedText(256),
596
+ model: boundedText(256),
597
+ promptRecord: pathText,
598
+ humanContributions: z.array(boundedText(512)).min(1).max(30),
599
+ references: z
600
+ .array(z
601
+ .object({
602
+ source: boundedText(1_024),
603
+ rightsStatus: z.enum(["approved", "pending", "rejected", "unknown"]),
604
+ evidence: pathText.optional(),
605
+ })
606
+ .strict())
607
+ .max(50),
608
+ })
609
+ .strict()
610
+ .optional(),
611
+ alternative: z
612
+ .object({
613
+ kind: z.enum([
614
+ "decorative",
615
+ "short-text",
616
+ "long-description",
617
+ "data-table",
618
+ "caption",
619
+ "transcript",
620
+ ]),
621
+ content: boundedText(4_096).optional(),
622
+ })
623
+ .strict(),
624
+ failureBehavior: z
625
+ .object({
626
+ strategy: z.enum(["hide-decorative", "text-alternative", "placeholder", "retry", "block"]),
627
+ behavior: boundedText(1_024),
628
+ })
629
+ .strict()
630
+ .optional(),
631
+ })
632
+ .strict();
633
+ const iconSystemSchema = z
634
+ .object({
635
+ name: boundedText(160),
636
+ grid: z.number().int().min(8).max(128),
637
+ sizes: z.array(z.number().int().min(8).max(512)).min(1).max(20),
638
+ stroke: z
639
+ .object({
640
+ style: z.enum(["outline", "filled", "duotone", "mixed"]),
641
+ weight: z.number().positive().max(16),
642
+ linecap: z.enum(["round", "square", "butt"]),
643
+ linejoin: z.enum(["round", "bevel", "miter"]),
644
+ })
645
+ .strict(),
646
+ icons: z
647
+ .array(z
648
+ .object({
649
+ id: idSchema,
650
+ name: boundedText(128),
651
+ meaning: boundedText(512),
652
+ asset: idSchema,
653
+ decorative: z.boolean(),
654
+ accessibleName: boundedText(256).optional(),
655
+ })
656
+ .strict())
657
+ .min(1)
658
+ .max(2_000),
659
+ })
660
+ .strict();
661
+ const presentationSchema = z
662
+ .object({
663
+ id: idSchema,
664
+ purpose: boundedText(512),
665
+ audience: boundedText(256),
666
+ aspectRatio: z.enum(["16:9", "4:3", "1:1", "a4-landscape", "a4-portrait"]),
667
+ masterLayouts: z.array(idSchema).min(2).max(40),
668
+ slides: z
669
+ .array(z
670
+ .object({
671
+ id: idSchema,
672
+ title: boundedText(256),
673
+ purpose: boundedText(512),
674
+ layout: idSchema,
675
+ readingOrder: z.array(boundedText(128)).min(1).max(50),
676
+ assets: z.array(idSchema).max(50),
677
+ speakerNotes: boundedText(4_096).optional(),
678
+ })
679
+ .strict())
680
+ .min(1)
681
+ .max(500),
682
+ })
683
+ .strict();
684
+ const accessibilitySchema = z
685
+ .object({
686
+ contrastPairs: z
687
+ .array(z
688
+ .object({
689
+ id: idSchema,
690
+ foreground: tokenNameSchema,
691
+ background: tokenNameSchema,
692
+ usage: z.enum(["normal-text", "large-text", "non-text"]),
693
+ mode: idSchema.optional(),
694
+ fontSizePx: z.number().positive().max(1_000).optional(),
695
+ fontWeight: z.number().int().min(100).max(1_000).optional(),
696
+ })
697
+ .strict())
698
+ .min(1)
699
+ .max(2_000),
700
+ nonColorCues: z
701
+ .array(z
702
+ .object({
703
+ meaning: boundedText(256),
704
+ cues: z
705
+ .array(z.enum(["color", "text", "icon", "shape", "pattern", "position", "value", "underline"]))
706
+ .min(2)
707
+ .max(8),
708
+ })
709
+ .strict())
710
+ .min(1)
711
+ .max(100),
712
+ })
713
+ .strict();
714
+ export const designDeliverableSchema = z
715
+ .object({
716
+ version: z.enum(["1.0", "2.0", "2.1"]),
717
+ id: idSchema,
718
+ product: boundedText(256),
719
+ preparedAt: z.string().datetime({ offset: true }),
720
+ preparedBy: z
721
+ .object({
722
+ type: z.enum(["agent", "human", "mixed"]),
723
+ name: boundedText(256),
724
+ })
725
+ .strict(),
726
+ scope: z
727
+ .object({
728
+ deliverables: z.array(deliverableKindSchema).min(1).max(6),
729
+ audience: boundedText(512),
730
+ channels: z.array(z.enum(["web", "mobile", "desktop", "presentation", "print", "social"])).min(1).max(6),
731
+ })
732
+ .strict(),
733
+ tokenSystem: z
734
+ .object({
735
+ tokens: z.array(tokenSchema).min(1).max(10_000),
736
+ modes: z.array(tokenModeSchema).max(50).default([]),
737
+ })
738
+ .strict(),
739
+ productTask: productTaskSchema.optional(),
740
+ interfaceTrust: interfaceTrustLinkSchema.optional(),
741
+ informationHierarchy: informationHierarchyLinkSchema.optional(),
742
+ metricContracts: metricContractsSchema.optional(),
743
+ generationWorkflow: generationWorkflowSchema.optional(),
744
+ visualDirection: visualDirectionSchema.optional(),
745
+ typography: typographySchema.optional(),
746
+ composition: compositionSchema.optional(),
747
+ densityProfile: densityProfileSchema.optional(),
748
+ interactionStates: interactionStateSchema.optional(),
749
+ motion: motionSchema.optional(),
750
+ chartContracts: z.array(chartContractSchema).max(500).optional(),
751
+ renderedEvidence: renderedEvidenceSchema.optional(),
752
+ humanVisualReview: humanVisualReviewSchema.optional(),
753
+ brand: brandSchema.optional(),
754
+ figma: figmaSchema.optional(),
755
+ assets: z.array(assetSchema).default([]),
756
+ iconSystem: iconSystemSchema.optional(),
757
+ presentations: z.array(presentationSchema).default([]),
758
+ accessibility: accessibilitySchema,
759
+ evidence: z
760
+ .array(z
761
+ .object({
762
+ id: idSchema,
763
+ kind: z.enum(["source", "review", "contrast", "export", "license", "runtime"]),
764
+ path: pathText,
765
+ detail: boundedText(1_024),
766
+ })
767
+ .strict())
768
+ .min(1)
769
+ .max(1_000),
770
+ })
771
+ .strict();
772
+ export const designIntelligenceFindingSchema = z
773
+ .object({
774
+ ruleId: z.string().regex(/^ZTDE-DI-[0-9]{3}$/),
775
+ severity: z.enum(["error", "warning", "info"]),
776
+ path: z.string(),
777
+ message: z.string(),
778
+ remediation: z.string(),
779
+ })
780
+ .strict();
781
+ export const designDeliverableReportSchema = z
782
+ .object({
783
+ version: z.string(),
784
+ generatedAt: z.string(),
785
+ sourcePath: z.string(),
786
+ manifestId: z.string(),
787
+ product: z.string(),
788
+ deliverables: z.array(deliverableKindSchema),
789
+ findings: z.array(designIntelligenceFindingSchema),
790
+ contrastResults: z.array(z
791
+ .object({
792
+ id: z.string(),
793
+ ratio: z.number(),
794
+ required: z.number(),
795
+ passed: z.boolean(),
796
+ })
797
+ .strict()),
798
+ coverage: z
799
+ .object({
800
+ tokens: z.number().int().nonnegative(),
801
+ assets: z.number().int().nonnegative(),
802
+ icons: z.number().int().nonnegative(),
803
+ presentations: z.number().int().nonnegative(),
804
+ slides: z.number().int().nonnegative(),
805
+ contrastPairs: z.number().int().nonnegative(),
806
+ typographyRoles: z.number().int().nonnegative(),
807
+ interactionStates: z.number().int().nonnegative(),
808
+ chartContracts: z.number().int().nonnegative(),
809
+ renderedViewports: z.number().int().nonnegative(),
810
+ metricContracts: z.number().int().nonnegative(),
811
+ generationStages: z.number().int().nonnegative(),
812
+ })
813
+ .strict(),
814
+ integration: z
815
+ .object({
816
+ generationReady: z.boolean(),
817
+ trustStatus: z.enum(["missing", "declared", "validated"]),
818
+ informationStatus: z.enum(["missing", "declared", "validated"]),
819
+ contractsValidated: z.boolean(),
820
+ automatedVerificationReady: z.boolean(),
821
+ humanReviewReady: z.boolean(),
822
+ releaseReady: z.boolean(),
823
+ stages: z.record(generationStageSchema, z.enum([
824
+ "missing",
825
+ "required",
826
+ "declared",
827
+ "implemented",
828
+ "verified",
829
+ "review-required",
830
+ "review-completed",
831
+ ])),
832
+ })
833
+ .strict(),
834
+ visualPolish: z
835
+ .object({
836
+ declared: z.boolean(),
837
+ requiredViewports: z.record(z.enum(["375", "768", "1024", "1440"]), z.enum(["missing", "planned", "captured", "verified"])),
838
+ renderedEvidenceReady: z.boolean(),
839
+ humanReviewReady: z.boolean(),
840
+ releaseReady: z.boolean(),
841
+ })
842
+ .strict(),
843
+ summary: z
844
+ .object({
845
+ errors: z.number().int().nonnegative(),
846
+ warnings: z.number().int().nonnegative(),
847
+ info: z.number().int().nonnegative(),
848
+ })
849
+ .strict(),
850
+ passed: z.boolean(),
851
+ limitations: z.array(z.string()),
852
+ })
853
+ .strict();
854
+ //# sourceMappingURL=schema.js.map