quiver-cli 1.3.0 → 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 (384) hide show
  1. package/README.md +197 -239
  2. package/dist/cli.js +3163 -2040
  3. package/package.json +10 -11
  4. package/template/.agents/AGENTS.md +0 -26
  5. package/template/.agents/commands/cp.md +0 -108
  6. package/template/.agents/commands/next-setup.md +0 -1064
  7. package/template/.agents/commands/review.md +0 -68
  8. package/template/.agents/commands/terraform-readme.md +0 -38
  9. package/template/.agents/config.json +0 -80
  10. package/template/.agents/plugins/opencode/rtk.ts +0 -34
  11. package/template/.agents/skills/agent-browser/SKILL.md +0 -51
  12. package/template/.agents/skills/apps/skybridge/SKILL.md +0 -50
  13. package/template/.agents/skills/code/cleanup/SKILL.md +0 -26
  14. package/template/.agents/skills/code/improve/SKILL.md +0 -122
  15. package/template/.agents/skills/code/improve/references/audit-playbook.md +0 -130
  16. package/template/.agents/skills/code/improve/references/closing-the-loop.md +0 -96
  17. package/template/.agents/skills/code/improve/references/plan-template.md +0 -197
  18. package/template/.agents/skills/code/vercel-react-best-practices/AGENTS.md +0 -3810
  19. package/template/.agents/skills/code/vercel-react-best-practices/README.md +0 -123
  20. package/template/.agents/skills/code/vercel-react-best-practices/SKILL.md +0 -149
  21. package/template/.agents/skills/code/vercel-react-best-practices/metadata.json +0 -15
  22. package/template/.agents/skills/code/vercel-react-best-practices/rules/_sections.md +0 -46
  23. package/template/.agents/skills/code/vercel-react-best-practices/rules/_template.md +0 -28
  24. package/template/.agents/skills/code/vercel-react-best-practices/rules/advanced-effect-event-deps.md +0 -56
  25. package/template/.agents/skills/code/vercel-react-best-practices/rules/advanced-event-handler-refs.md +0 -55
  26. package/template/.agents/skills/code/vercel-react-best-practices/rules/advanced-init-once.md +0 -42
  27. package/template/.agents/skills/code/vercel-react-best-practices/rules/advanced-use-latest.md +0 -39
  28. package/template/.agents/skills/code/vercel-react-best-practices/rules/async-api-routes.md +0 -38
  29. package/template/.agents/skills/code/vercel-react-best-practices/rules/async-cheap-condition-before-await.md +0 -37
  30. package/template/.agents/skills/code/vercel-react-best-practices/rules/async-defer-await.md +0 -82
  31. package/template/.agents/skills/code/vercel-react-best-practices/rules/async-dependencies.md +0 -51
  32. package/template/.agents/skills/code/vercel-react-best-practices/rules/async-parallel.md +0 -28
  33. package/template/.agents/skills/code/vercel-react-best-practices/rules/async-suspense-boundaries.md +0 -99
  34. package/template/.agents/skills/code/vercel-react-best-practices/rules/bundle-analyzable-paths.md +0 -63
  35. package/template/.agents/skills/code/vercel-react-best-practices/rules/bundle-barrel-imports.md +0 -60
  36. package/template/.agents/skills/code/vercel-react-best-practices/rules/bundle-conditional.md +0 -31
  37. package/template/.agents/skills/code/vercel-react-best-practices/rules/bundle-defer-third-party.md +0 -49
  38. package/template/.agents/skills/code/vercel-react-best-practices/rules/bundle-dynamic-imports.md +0 -35
  39. package/template/.agents/skills/code/vercel-react-best-practices/rules/bundle-preload.md +0 -50
  40. package/template/.agents/skills/code/vercel-react-best-practices/rules/client-event-listeners.md +0 -74
  41. package/template/.agents/skills/code/vercel-react-best-practices/rules/client-localstorage-schema.md +0 -71
  42. package/template/.agents/skills/code/vercel-react-best-practices/rules/client-passive-event-listeners.md +0 -48
  43. package/template/.agents/skills/code/vercel-react-best-practices/rules/client-swr-dedup.md +0 -56
  44. package/template/.agents/skills/code/vercel-react-best-practices/rules/js-batch-dom-css.md +0 -107
  45. package/template/.agents/skills/code/vercel-react-best-practices/rules/js-cache-function-results.md +0 -80
  46. package/template/.agents/skills/code/vercel-react-best-practices/rules/js-cache-property-access.md +0 -28
  47. package/template/.agents/skills/code/vercel-react-best-practices/rules/js-cache-storage.md +0 -70
  48. package/template/.agents/skills/code/vercel-react-best-practices/rules/js-combine-iterations.md +0 -32
  49. package/template/.agents/skills/code/vercel-react-best-practices/rules/js-early-exit.md +0 -50
  50. package/template/.agents/skills/code/vercel-react-best-practices/rules/js-flatmap-filter.md +0 -60
  51. package/template/.agents/skills/code/vercel-react-best-practices/rules/js-hoist-regexp.md +0 -45
  52. package/template/.agents/skills/code/vercel-react-best-practices/rules/js-index-maps.md +0 -37
  53. package/template/.agents/skills/code/vercel-react-best-practices/rules/js-length-check-first.md +0 -49
  54. package/template/.agents/skills/code/vercel-react-best-practices/rules/js-min-max-loop.md +0 -82
  55. package/template/.agents/skills/code/vercel-react-best-practices/rules/js-request-idle-callback.md +0 -105
  56. package/template/.agents/skills/code/vercel-react-best-practices/rules/js-set-map-lookups.md +0 -24
  57. package/template/.agents/skills/code/vercel-react-best-practices/rules/js-tosorted-immutable.md +0 -57
  58. package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-activity.md +0 -26
  59. package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
  60. package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-conditional-render.md +0 -40
  61. package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-content-visibility.md +0 -38
  62. package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-hoist-jsx.md +0 -46
  63. package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
  64. package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +0 -30
  65. package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-resource-hints.md +0 -85
  66. package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-script-defer-async.md +0 -68
  67. package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-svg-precision.md +0 -28
  68. package/template/.agents/skills/code/vercel-react-best-practices/rules/rendering-usetransition-loading.md +0 -75
  69. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-defer-reads.md +0 -39
  70. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-dependencies.md +0 -45
  71. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +0 -40
  72. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-derived-state.md +0 -29
  73. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-functional-setstate.md +0 -74
  74. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-lazy-state-init.md +0 -58
  75. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +0 -38
  76. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-memo.md +0 -44
  77. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +0 -45
  78. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-no-inline-components.md +0 -82
  79. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +0 -35
  80. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-split-combined-hooks.md +0 -64
  81. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-transitions.md +0 -40
  82. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-use-deferred-value.md +0 -59
  83. package/template/.agents/skills/code/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +0 -73
  84. package/template/.agents/skills/code/vercel-react-best-practices/rules/server-after-nonblocking.md +0 -73
  85. package/template/.agents/skills/code/vercel-react-best-practices/rules/server-auth-actions.md +0 -96
  86. package/template/.agents/skills/code/vercel-react-best-practices/rules/server-cache-lru.md +0 -41
  87. package/template/.agents/skills/code/vercel-react-best-practices/rules/server-cache-react.md +0 -76
  88. package/template/.agents/skills/code/vercel-react-best-practices/rules/server-dedup-props.md +0 -65
  89. package/template/.agents/skills/code/vercel-react-best-practices/rules/server-hoist-static-io.md +0 -149
  90. package/template/.agents/skills/code/vercel-react-best-practices/rules/server-no-shared-module-state.md +0 -50
  91. package/template/.agents/skills/code/vercel-react-best-practices/rules/server-parallel-fetching.md +0 -83
  92. package/template/.agents/skills/code/vercel-react-best-practices/rules/server-parallel-nested-fetching.md +0 -34
  93. package/template/.agents/skills/code/vercel-react-best-practices/rules/server-serialization.md +0 -38
  94. package/template/.agents/skills/data/prisma-cli/SKILL.md +0 -247
  95. package/template/.agents/skills/data/prisma-cli/references/db-execute.md +0 -78
  96. package/template/.agents/skills/data/prisma-cli/references/db-pull.md +0 -185
  97. package/template/.agents/skills/data/prisma-cli/references/db-push.md +0 -148
  98. package/template/.agents/skills/data/prisma-cli/references/db-seed.md +0 -188
  99. package/template/.agents/skills/data/prisma-cli/references/debug.md +0 -46
  100. package/template/.agents/skills/data/prisma-cli/references/dev.md +0 -157
  101. package/template/.agents/skills/data/prisma-cli/references/format.md +0 -48
  102. package/template/.agents/skills/data/prisma-cli/references/generate.md +0 -173
  103. package/template/.agents/skills/data/prisma-cli/references/init.md +0 -136
  104. package/template/.agents/skills/data/prisma-cli/references/mcp.md +0 -38
  105. package/template/.agents/skills/data/prisma-cli/references/migrate-deploy.md +0 -127
  106. package/template/.agents/skills/data/prisma-cli/references/migrate-dev.md +0 -145
  107. package/template/.agents/skills/data/prisma-cli/references/migrate-diff.md +0 -89
  108. package/template/.agents/skills/data/prisma-cli/references/migrate-reset.md +0 -78
  109. package/template/.agents/skills/data/prisma-cli/references/migrate-resolve.md +0 -57
  110. package/template/.agents/skills/data/prisma-cli/references/migrate-status.md +0 -65
  111. package/template/.agents/skills/data/prisma-cli/references/studio.md +0 -137
  112. package/template/.agents/skills/data/prisma-cli/references/validate.md +0 -53
  113. package/template/.agents/skills/data/prisma-client-api/SKILL.md +0 -216
  114. package/template/.agents/skills/data/prisma-client-api/references/client-methods.md +0 -223
  115. package/template/.agents/skills/data/prisma-client-api/references/constructor.md +0 -208
  116. package/template/.agents/skills/data/prisma-client-api/references/filters.md +0 -256
  117. package/template/.agents/skills/data/prisma-client-api/references/model-queries.md +0 -281
  118. package/template/.agents/skills/data/prisma-client-api/references/query-options.md +0 -276
  119. package/template/.agents/skills/data/prisma-client-api/references/raw-queries.md +0 -194
  120. package/template/.agents/skills/data/prisma-client-api/references/relations.md +0 -308
  121. package/template/.agents/skills/data/prisma-client-api/references/transactions.md +0 -184
  122. package/template/.agents/skills/design/impeccable/SKILL.md +0 -84
  123. package/template/.agents/skills/design/impeccable/reference/adapt.md +0 -312
  124. package/template/.agents/skills/design/impeccable/reference/adapt.native.md +0 -58
  125. package/template/.agents/skills/design/impeccable/reference/android.md +0 -40
  126. package/template/.agents/skills/design/impeccable/reference/animate.md +0 -86
  127. package/template/.agents/skills/design/impeccable/reference/audit.md +0 -136
  128. package/template/.agents/skills/design/impeccable/reference/audit.native.md +0 -139
  129. package/template/.agents/skills/design/impeccable/reference/bolder.md +0 -31
  130. package/template/.agents/skills/design/impeccable/reference/clarify.md +0 -94
  131. package/template/.agents/skills/design/impeccable/reference/colorize.md +0 -86
  132. package/template/.agents/skills/design/impeccable/reference/craft-floor.md +0 -42
  133. package/template/.agents/skills/design/impeccable/reference/craft.md +0 -5
  134. package/template/.agents/skills/design/impeccable/reference/critique.md +0 -788
  135. package/template/.agents/skills/design/impeccable/reference/degraded/asset-producer.md +0 -90
  136. package/template/.agents/skills/design/impeccable/reference/degraded/documenter.md +0 -24
  137. package/template/.agents/skills/design/impeccable/reference/degraded/finish-reviewer.md +0 -37
  138. package/template/.agents/skills/design/impeccable/reference/degraded/manual-edit-applier.md +0 -92
  139. package/template/.agents/skills/design/impeccable/reference/delight.md +0 -70
  140. package/template/.agents/skills/design/impeccable/reference/distill.md +0 -111
  141. package/template/.agents/skills/design/impeccable/reference/doctor.md +0 -53
  142. package/template/.agents/skills/design/impeccable/reference/document.md +0 -416
  143. package/template/.agents/skills/design/impeccable/reference/extract.md +0 -69
  144. package/template/.agents/skills/design/impeccable/reference/harden.md +0 -336
  145. package/template/.agents/skills/design/impeccable/reference/hooks.md +0 -105
  146. package/template/.agents/skills/design/impeccable/reference/init.md +0 -125
  147. package/template/.agents/skills/design/impeccable/reference/ios.md +0 -45
  148. package/template/.agents/skills/design/impeccable/reference/layout.md +0 -84
  149. package/template/.agents/skills/design/impeccable/reference/live-setup.md +0 -102
  150. package/template/.agents/skills/design/impeccable/reference/live.md +0 -323
  151. package/template/.agents/skills/design/impeccable/reference/new-work.md +0 -105
  152. package/template/.agents/skills/design/impeccable/reference/onboard.md +0 -234
  153. package/template/.agents/skills/design/impeccable/reference/operate.md +0 -61
  154. package/template/.agents/skills/design/impeccable/reference/optimize.md +0 -258
  155. package/template/.agents/skills/design/impeccable/reference/overdrive.md +0 -127
  156. package/template/.agents/skills/design/impeccable/reference/polish.md +0 -97
  157. package/template/.agents/skills/design/impeccable/reference/quieter.md +0 -99
  158. package/template/.agents/skills/design/impeccable/reference/routing.md +0 -18
  159. package/template/.agents/skills/design/impeccable/reference/shape.md +0 -59
  160. package/template/.agents/skills/design/impeccable/reference/typeset.md +0 -80
  161. package/template/.agents/skills/design/impeccable/reference/visualize.md +0 -47
  162. package/template/.agents/skills/design/impeccable/scripts/command-metadata.json +0 -94
  163. package/template/.agents/skills/design/impeccable/scripts/concept-seed.mjs +0 -558
  164. package/template/.agents/skills/design/impeccable/scripts/context-signals.mjs +0 -334
  165. package/template/.agents/skills/design/impeccable/scripts/context.mjs +0 -1450
  166. package/template/.agents/skills/design/impeccable/scripts/critique-storage.mjs +0 -213
  167. package/template/.agents/skills/design/impeccable/scripts/detect-csp.mjs +0 -198
  168. package/template/.agents/skills/design/impeccable/scripts/detect.mjs +0 -21
  169. package/template/.agents/skills/design/impeccable/scripts/detector/browser/injected/index.mjs +0 -2023
  170. package/template/.agents/skills/design/impeccable/scripts/detector/cli/main.mjs +0 -438
  171. package/template/.agents/skills/design/impeccable/scripts/detector/design-system.mjs +0 -983
  172. package/template/.agents/skills/design/impeccable/scripts/detector/detect-antipatterns-browser.js +0 -8283
  173. package/template/.agents/skills/design/impeccable/scripts/detector/detect-antipatterns.mjs +0 -50
  174. package/template/.agents/skills/design/impeccable/scripts/detector/engines/browser/detect-url.mjs +0 -372
  175. package/template/.agents/skills/design/impeccable/scripts/detector/engines/regex/detect-text.mjs +0 -768
  176. package/template/.agents/skills/design/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +0 -1186
  177. package/template/.agents/skills/design/impeccable/scripts/detector/engines/static-html/detect-html.mjs +0 -264
  178. package/template/.agents/skills/design/impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +0 -189
  179. package/template/.agents/skills/design/impeccable/scripts/detector/findings.mjs +0 -18
  180. package/template/.agents/skills/design/impeccable/scripts/detector/node/file-system.mjs +0 -212
  181. package/template/.agents/skills/design/impeccable/scripts/detector/profile/profiler.mjs +0 -166
  182. package/template/.agents/skills/design/impeccable/scripts/detector/registry/antipatterns.mjs +0 -617
  183. package/template/.agents/skills/design/impeccable/scripts/detector/rules/checks.mjs +0 -5580
  184. package/template/.agents/skills/design/impeccable/scripts/detector/shared/color.mjs +0 -124
  185. package/template/.agents/skills/design/impeccable/scripts/detector/shared/constants.mjs +0 -112
  186. package/template/.agents/skills/design/impeccable/scripts/detector/shared/fonts.mjs +0 -30
  187. package/template/.agents/skills/design/impeccable/scripts/detector/shared/inline-ignores.mjs +0 -148
  188. package/template/.agents/skills/design/impeccable/scripts/detector/shared/page.mjs +0 -7
  189. package/template/.agents/skills/design/impeccable/scripts/doctor.mjs +0 -336
  190. package/template/.agents/skills/design/impeccable/scripts/embed-prompt.mjs +0 -133
  191. package/template/.agents/skills/design/impeccable/scripts/generate-image.mjs +0 -240
  192. package/template/.agents/skills/design/impeccable/scripts/hook-admin.mjs +0 -741
  193. package/template/.agents/skills/design/impeccable/scripts/hook-before-edit.mjs +0 -516
  194. package/template/.agents/skills/design/impeccable/scripts/hook-lib.mjs +0 -2100
  195. package/template/.agents/skills/design/impeccable/scripts/hook.mjs +0 -78
  196. package/template/.agents/skills/design/impeccable/scripts/lib/artifact-schema.mjs +0 -93
  197. package/template/.agents/skills/design/impeccable/scripts/lib/composition-catalog.mjs +0 -200
  198. package/template/.agents/skills/design/impeccable/scripts/lib/concept-catalog.mjs +0 -357
  199. package/template/.agents/skills/design/impeccable/scripts/lib/design-parser.mjs +0 -842
  200. package/template/.agents/skills/design/impeccable/scripts/lib/impeccable-config.mjs +0 -658
  201. package/template/.agents/skills/design/impeccable/scripts/lib/impeccable-paths.mjs +0 -137
  202. package/template/.agents/skills/design/impeccable/scripts/lib/is-generated.mjs +0 -69
  203. package/template/.agents/skills/design/impeccable/scripts/lib/provider.mjs +0 -5
  204. package/template/.agents/skills/design/impeccable/scripts/lib/roll-selection.mjs +0 -362
  205. package/template/.agents/skills/design/impeccable/scripts/lib/staleness-deep.mjs +0 -457
  206. package/template/.agents/skills/design/impeccable/scripts/lib/staleness-notice.mjs +0 -169
  207. package/template/.agents/skills/design/impeccable/scripts/lib/staleness.mjs +0 -457
  208. package/template/.agents/skills/design/impeccable/scripts/lib/surface-briefs.mjs +0 -151
  209. package/template/.agents/skills/design/impeccable/scripts/lib/target-args.mjs +0 -42
  210. package/template/.agents/skills/design/impeccable/scripts/lib/target-slug.mjs +0 -33
  211. package/template/.agents/skills/design/impeccable/scripts/lib/template-extensions.mjs +0 -146
  212. package/template/.agents/skills/design/impeccable/scripts/live/accept-css.mjs +0 -617
  213. package/template/.agents/skills/design/impeccable/scripts/live/accept-verify.mjs +0 -60
  214. package/template/.agents/skills/design/impeccable/scripts/live/browser-script-parts.mjs +0 -55
  215. package/template/.agents/skills/design/impeccable/scripts/live/completion.mjs +0 -28
  216. package/template/.agents/skills/design/impeccable/scripts/live/event-validation.mjs +0 -199
  217. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/astro.mjs +0 -47
  218. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/detect-utils.mjs +0 -73
  219. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/index.mjs +0 -143
  220. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/journal.mjs +0 -197
  221. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/nextjs.mjs +0 -49
  222. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/nuxt.mjs +0 -161
  223. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/script-src.mjs +0 -17
  224. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/static-html.mjs +0 -26
  225. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/sveltekit.mjs +0 -71
  226. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/tag-strategy.mjs +0 -247
  227. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/tanstack-start.mjs +0 -70
  228. package/template/.agents/skills/design/impeccable/scripts/live/frameworks/vite-generic.mjs +0 -42
  229. package/template/.agents/skills/design/impeccable/scripts/live/generation-preflight.mjs +0 -149
  230. package/template/.agents/skills/design/impeccable/scripts/live/insert-ui.mjs +0 -458
  231. package/template/.agents/skills/design/impeccable/scripts/live/instructions.mjs +0 -142
  232. package/template/.agents/skills/design/impeccable/scripts/live/manual-apply.mjs +0 -939
  233. package/template/.agents/skills/design/impeccable/scripts/live/manual-edit-routes.mjs +0 -357
  234. package/template/.agents/skills/design/impeccable/scripts/live/manual-edits-buffer.mjs +0 -152
  235. package/template/.agents/skills/design/impeccable/scripts/live/poll-lanes.mjs +0 -14
  236. package/template/.agents/skills/design/impeccable/scripts/live/roots.mjs +0 -508
  237. package/template/.agents/skills/design/impeccable/scripts/live/session-store.mjs +0 -563
  238. package/template/.agents/skills/design/impeccable/scripts/live/source-lock.mjs +0 -105
  239. package/template/.agents/skills/design/impeccable/scripts/live/source-search.mjs +0 -105
  240. package/template/.agents/skills/design/impeccable/scripts/live/svelte-ast.mjs +0 -961
  241. package/template/.agents/skills/design/impeccable/scripts/live/svelte-component.mjs +0 -1342
  242. package/template/.agents/skills/design/impeccable/scripts/live/sveltekit-adapter.mjs +0 -316
  243. package/template/.agents/skills/design/impeccable/scripts/live/tanstack-adapter.mjs +0 -280
  244. package/template/.agents/skills/design/impeccable/scripts/live/ui-core.mjs +0 -180
  245. package/template/.agents/skills/design/impeccable/scripts/live/vocabulary.mjs +0 -171
  246. package/template/.agents/skills/design/impeccable/scripts/live-accept.mjs +0 -954
  247. package/template/.agents/skills/design/impeccable/scripts/live-browser-dom.js +0 -146
  248. package/template/.agents/skills/design/impeccable/scripts/live-browser-session.js +0 -123
  249. package/template/.agents/skills/design/impeccable/scripts/live-browser.js +0 -12512
  250. package/template/.agents/skills/design/impeccable/scripts/live-commit-manual-edits.mjs +0 -1244
  251. package/template/.agents/skills/design/impeccable/scripts/live-complete.mjs +0 -107
  252. package/template/.agents/skills/design/impeccable/scripts/live-copy-edit-agent.mjs +0 -683
  253. package/template/.agents/skills/design/impeccable/scripts/live-discard-manual-edits.mjs +0 -51
  254. package/template/.agents/skills/design/impeccable/scripts/live-inject.mjs +0 -503
  255. package/template/.agents/skills/design/impeccable/scripts/live-insert.mjs +0 -292
  256. package/template/.agents/skills/design/impeccable/scripts/live-manual-edit-evidence.mjs +0 -368
  257. package/template/.agents/skills/design/impeccable/scripts/live-poll.mjs +0 -429
  258. package/template/.agents/skills/design/impeccable/scripts/live-resume.mjs +0 -123
  259. package/template/.agents/skills/design/impeccable/scripts/live-server.mjs +0 -1661
  260. package/template/.agents/skills/design/impeccable/scripts/live-status.mjs +0 -71
  261. package/template/.agents/skills/design/impeccable/scripts/live-target.mjs +0 -30
  262. package/template/.agents/skills/design/impeccable/scripts/live-wrap.mjs +0 -927
  263. package/template/.agents/skills/design/impeccable/scripts/live.mjs +0 -359
  264. package/template/.agents/skills/design/impeccable/scripts/modern-screenshot.umd.js +0 -14
  265. package/template/.agents/skills/design/impeccable/scripts/palette.mjs +0 -628
  266. package/template/.agents/skills/design/impeccable/scripts/pin.mjs +0 -221
  267. package/template/.agents/skills/design/impeccable/scripts/serve-question.mjs +0 -932
  268. package/template/.agents/skills/design/impeccable/scripts/surface-brief.mjs +0 -74
  269. package/template/.agents/skills/design/shadcn/SKILL.md +0 -277
  270. package/template/.agents/skills/design/shadcn/agents/openai.yml +0 -5
  271. package/template/.agents/skills/design/shadcn/assets/shadcn-small.png +0 -0
  272. package/template/.agents/skills/design/shadcn/assets/shadcn.png +0 -0
  273. package/template/.agents/skills/design/shadcn/cli.md +0 -290
  274. package/template/.agents/skills/design/shadcn/customization.md +0 -209
  275. package/template/.agents/skills/design/shadcn/evals/evals.json +0 -77
  276. package/template/.agents/skills/design/shadcn/mcp.md +0 -105
  277. package/template/.agents/skills/design/shadcn/registry.md +0 -277
  278. package/template/.agents/skills/design/shadcn/rules/base-vs-radix.md +0 -306
  279. package/template/.agents/skills/design/shadcn/rules/chat.md +0 -224
  280. package/template/.agents/skills/design/shadcn/rules/composition.md +0 -213
  281. package/template/.agents/skills/design/shadcn/rules/forms.md +0 -192
  282. package/template/.agents/skills/design/shadcn/rules/icons.md +0 -101
  283. package/template/.agents/skills/design/shadcn/rules/styling.md +0 -185
  284. package/template/.agents/skills/find-skills/SKILL.md +0 -141
  285. package/template/.agents/skills/hono/SKILL.md +0 -579
  286. package/template/.agents/skills/integrations/langfuse/SKILL.md +0 -146
  287. package/template/.agents/skills/integrations/langfuse/references/ci-cd.md +0 -41
  288. package/template/.agents/skills/integrations/langfuse/references/cli.md +0 -60
  289. package/template/.agents/skills/integrations/langfuse/references/error-analysis.md +0 -88
  290. package/template/.agents/skills/integrations/langfuse/references/instrumentation.md +0 -121
  291. package/template/.agents/skills/integrations/langfuse/references/judge-calibration.md +0 -291
  292. package/template/.agents/skills/integrations/langfuse/references/prompt-engineering.md +0 -35
  293. package/template/.agents/skills/integrations/langfuse/references/prompt-migration.md +0 -79
  294. package/template/.agents/skills/integrations/langfuse/references/skill-feedback.md +0 -55
  295. package/template/.agents/skills/integrations/langfuse/references/trace-evaluator-upgrade.md +0 -76
  296. package/template/.agents/skills/integrations/langfuse/references/user-feedback.md +0 -92
  297. package/template/.agents/skills/integrations/langfuse/references/v4-project-migration.md +0 -73
  298. package/template/.agents/skills/integrations/posthog/SKILL.md +0 -102
  299. package/template/.agents/skills/integrations/posthog/references/error-tracking-alerts.md +0 -63
  300. package/template/.agents/skills/integrations/posthog/references/error-tracking-assigning-issues.md +0 -77
  301. package/template/.agents/skills/integrations/posthog/references/error-tracking-fingerprints.md +0 -57
  302. package/template/.agents/skills/integrations/posthog/references/error-tracking-monitoring.md +0 -140
  303. package/template/.agents/skills/integrations/posthog/references/error-tracking-nextjs.md +0 -490
  304. package/template/.agents/skills/integrations/posthog/references/error-tracking-source-maps.md +0 -45
  305. package/template/.agents/skills/integrations/posthog/references/feature-flags-best-practices.md +0 -139
  306. package/template/.agents/skills/integrations/posthog/references/feature-flags-react.md +0 -302
  307. package/template/.agents/skills/integrations/posthog/references/identify-users.md +0 -202
  308. package/template/.agents/skills/integrations/posthog/references/integration-example.md +0 -706
  309. package/template/.agents/skills/integrations/posthog/references/integration-nextjs.md +0 -385
  310. package/template/.agents/skills/integrations/posthog/references/integration-step-1-begin.md +0 -43
  311. package/template/.agents/skills/integrations/posthog/references/integration-step-2-edit.md +0 -37
  312. package/template/.agents/skills/integrations/posthog/references/integration-step-3-revise.md +0 -22
  313. package/template/.agents/skills/integrations/posthog/references/integration-step-4-conclude.md +0 -38
  314. package/template/.agents/skills/integrations/posthog/references/llm-analytics-anthropic.md +0 -200
  315. package/template/.agents/skills/integrations/posthog/references/llm-analytics-basics.md +0 -62
  316. package/template/.agents/skills/integrations/posthog/references/llm-analytics-costs.md +0 -197
  317. package/template/.agents/skills/integrations/posthog/references/llm-analytics-manual-capture.md +0 -397
  318. package/template/.agents/skills/integrations/posthog/references/llm-analytics-traces.md +0 -98
  319. package/template/.agents/skills/integrations/posthog/references/llm-analytics-vercel-ai.md +0 -120
  320. package/template/.agents/skills/repo/repo-ci/SKILL.md +0 -265
  321. package/template/.agents/skills/repo/repo-init-next-js/SKILL.md +0 -129
  322. package/template/.agents/skills/repo/repo-init-next-js/references/file-contents.md +0 -800
  323. package/template/.agents/skills/repo/repo-init-next-js/scripts/setup.sh +0 -47
  324. package/template/.agents/skills/repo/repo-init-node/SKILL.md +0 -196
  325. package/template/.agents/skills/skill-creator/LICENSE.txt +0 -202
  326. package/template/.agents/skills/skill-creator/SKILL.md +0 -485
  327. package/template/.agents/skills/skill-creator/agents/analyzer.md +0 -274
  328. package/template/.agents/skills/skill-creator/agents/comparator.md +0 -202
  329. package/template/.agents/skills/skill-creator/agents/grader.md +0 -223
  330. package/template/.agents/skills/skill-creator/assets/eval_review.html +0 -146
  331. package/template/.agents/skills/skill-creator/eval-viewer/generate_review.py +0 -471
  332. package/template/.agents/skills/skill-creator/eval-viewer/viewer.html +0 -1325
  333. package/template/.agents/skills/skill-creator/references/schemas.md +0 -430
  334. package/template/.agents/skills/skill-creator/scripts/__init__.py +0 -0
  335. package/template/.agents/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
  336. package/template/.agents/skills/skill-creator/scripts/generate_report.py +0 -326
  337. package/template/.agents/skills/skill-creator/scripts/improve_description.py +0 -247
  338. package/template/.agents/skills/skill-creator/scripts/package_skill.py +0 -136
  339. package/template/.agents/skills/skill-creator/scripts/quick_validate.py +0 -103
  340. package/template/.agents/skills/skill-creator/scripts/run_eval.py +0 -310
  341. package/template/.agents/skills/skill-creator/scripts/run_loop.py +0 -328
  342. package/template/.agents/skills/skill-creator/scripts/utils.py +0 -47
  343. package/template/.agents/skills/supabase/CHANGELOG.md +0 -71
  344. package/template/.agents/skills/supabase/SKILL.md +0 -145
  345. package/template/.agents/skills/supabase/assets/feedback-issue-template.md +0 -17
  346. package/template/.agents/skills/supabase/references/skill-feedback.md +0 -17
  347. package/template/.agents/skills/supabase-postgres-best-practices/CHANGELOG.md +0 -73
  348. package/template/.agents/skills/supabase-postgres-best-practices/SKILL.md +0 -64
  349. package/template/.agents/skills/supabase-postgres-best-practices/references/_contributing.md +0 -170
  350. package/template/.agents/skills/supabase-postgres-best-practices/references/_sections.md +0 -39
  351. package/template/.agents/skills/supabase-postgres-best-practices/references/_template.md +0 -34
  352. package/template/.agents/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +0 -55
  353. package/template/.agents/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +0 -49
  354. package/template/.agents/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +0 -46
  355. package/template/.agents/skills/supabase-postgres-best-practices/references/conn-limits.md +0 -44
  356. package/template/.agents/skills/supabase-postgres-best-practices/references/conn-pooling.md +0 -41
  357. package/template/.agents/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +0 -46
  358. package/template/.agents/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +0 -54
  359. package/template/.agents/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +0 -53
  360. package/template/.agents/skills/supabase-postgres-best-practices/references/data-pagination.md +0 -50
  361. package/template/.agents/skills/supabase-postgres-best-practices/references/data-upsert.md +0 -50
  362. package/template/.agents/skills/supabase-postgres-best-practices/references/lock-advisory.md +0 -56
  363. package/template/.agents/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +0 -68
  364. package/template/.agents/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +0 -50
  365. package/template/.agents/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +0 -54
  366. package/template/.agents/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +0 -45
  367. package/template/.agents/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +0 -55
  368. package/template/.agents/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +0 -55
  369. package/template/.agents/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +0 -44
  370. package/template/.agents/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +0 -40
  371. package/template/.agents/skills/supabase-postgres-best-practices/references/query-index-types.md +0 -48
  372. package/template/.agents/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +0 -43
  373. package/template/.agents/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +0 -45
  374. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-constraints.md +0 -80
  375. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-data-types.md +0 -46
  376. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +0 -59
  377. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +0 -55
  378. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-partitioning.md +0 -55
  379. package/template/.agents/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +0 -61
  380. package/template/.agents/skills/supabase-postgres-best-practices/references/security-privileges.md +0 -54
  381. package/template/.agents/skills/supabase-postgres-best-practices/references/security-rls-basics.md +0 -50
  382. package/template/.agents/skills/supabase-postgres-best-practices/references/security-rls-performance.md +0 -63
  383. package/template/.agents/skills/writing/humanizer/SKILL.md +0 -621
  384. package/template/.agents/upstreams.json +0 -116
@@ -1,558 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * External concept seed: the dice half of new-work's complete-direction and
4
- * established-world surface procedures.
5
- *
6
- * Before this script runs, the model retrieves cultural material and derives
7
- * a grounded shortlist of complete candidate directions from it (see
8
- * reference/new-work.md). Left alone, it then always builds its #1 —
9
- * and a single model's resonance ranking is deterministic, so every run
10
- * in a category ships the same one or two concepts. Measured: 30/35
11
- * identical concepts across 16 prompt framings; the model cannot roll
12
- * its own dice.
13
- *
14
- * This script rolls them from outside, the same trick that made the
15
- * palette seed work:
16
- * - ASSIGNED INDEX: which entry of the model's own resonance-ordered
17
- * shortlist gets built. The assignment is the dice: it never chooses an
18
- * ungrounded ingredient, it only refuses the argmax rut. Attended runs
19
- * present the assigned direction and offer re-roll instead of a ranked
20
- * lineup, because a lineup hands selection back to a taste function
21
- * (model or user) and taste functions pick the safest card.
22
- * - CHALLENGERS (6): outside forms from concept-ingredients.json, two from
23
- * each challenger tier (graphic system, instrument language, atmosphere
24
- * world), fused with the product first (challenger supplies form and
25
- * system grammar, product supplies every fact, clarity wins conflicts),
26
- * then weighed against the derived candidates on audience identification
27
- * and product clarity. They win only when they beat the grounded list;
28
- * measured behavior is that they lose to strong cultural material and
29
- * win over thin categories, which is the intended shape.
30
- * - RE-ROLL (--reroll <n>): round n of the same base key. The script
31
- * recomputes what rounds 0..n-1 drew, excludes all of it, and rolls a
32
- * fresh assigned index, challengers, and compositions. One base key therefore
33
- * reproduces the entire chain of rounds.
34
- * - RATINGS: the reviewer's approval ratings weight the challenger draw
35
- * (3-star doubles the odds, 1-star sits out); the approved pool itself
36
- * is unchanged.
37
- *
38
- * Usage:
39
- * node scripts/concept-seed.mjs --scope direction --mode persuade
40
- * node scripts/concept-seed.mjs --scope surface --mode operate --from <key>
41
- * node scripts/concept-seed.mjs --scope surface --mode operate --grain flow
42
- * node scripts/concept-seed.mjs --scope direction --candidate-count 6
43
- * node scripts/concept-seed.mjs --scope direction --mode persuade --from <key> --reroll 1
44
- * node scripts/concept-seed.mjs --chosen <challenger-id> --from <key> --scope direction
45
- *
46
- * --grain names how much of the product is in play: product, flow, view, or
47
- * region. A docs site, an onboarding flow, a landing page and a data table are
48
- * four different amounts of product and want different compositions. Grain is a
49
- * preference: it deals matching compositions first and tops up from the rest of
50
- * the register, and the rendered seed says how many actually matched so a
51
- * borrowed structure is never mistaken for a supplied one.
52
- *
53
- * --platform names the delivery target (web, ios, android). Unlike grain this is
54
- * a hard filter: a composition that needs hover or a pointer does not degrade on
55
- * a phone, it stops working. --mode also gates which worlds are eligible, for
56
- * worlds whose reviewer marked them as carrying only some modes.
57
- *
58
- * --mode names the requested surface's mode (persuade, operate, read,
59
- * experience) so the appended compositions match its register of work; omitted,
60
- * they roll from the full approved pool.
61
- *
62
- * Challenger data resolves in order: a local catalog directory (the private
63
- * service repo, evals, and tests set IMPECCABLE_CATALOG_DIR), then the roll
64
- * API at impeccable.style, then a degraded assignment-only seed when both are
65
- * unavailable. --chosen sends the anonymous choice ping for API-dealt rolls;
66
- * DO_NOT_TRACK or IMPECCABLE_NO_TELEMETRY disables it.
67
- *
68
- * Env vars:
69
- * IMPECCABLE_CONCEPT_SEED — same as --from; for reproducible eval runs.
70
- * IMPECCABLE_CATALOG_DIR — directory holding the four catalog JSON files.
71
- * IMPECCABLE_API_URL — roll API base (default https://impeccable.style/api).
72
- * IMPECCABLE_NO_TELEMETRY — disables the choice ping (DO_NOT_TRACK also honored).
73
- */
74
-
75
- import crypto from 'node:crypto';
76
- import { dirname, join, resolve } from 'node:path';
77
- import { fileURLToPath } from 'node:url';
78
- import {
79
- approvedPoolRevision,
80
- readConceptCatalog,
81
- validateConceptCatalog,
82
- WELL_TIERS,
83
- } from './lib/concept-catalog.mjs';
84
- import { readCompositionCatalog } from './lib/composition-catalog.mjs';
85
- import {
86
- COMPOSITION_GRAINS,
87
- COMPOSITION_PLATFORMS,
88
- runSyncSelection,
89
- selectApprovedChallengers as selectApprovedChallengersCore,
90
- selectApprovedCompositions as selectApprovedCompositionsCore,
91
- } from './lib/roll-selection.mjs';
92
-
93
- const here = dirname(fileURLToPath(import.meta.url));
94
-
95
- // Data resolution order: a local catalog (the private service repo, evals, and
96
- // tests point IMPECCABLE_CATALOG_DIR at one), then the roll API, then a
97
- // degraded assignment-only seed. The full catalog does not ship with the skill.
98
- const CATALOG_DIR = process.env.IMPECCABLE_CATALOG_DIR || here;
99
- const API_BASE = (process.env.IMPECCABLE_API_URL || 'https://impeccable.style/api').replace(/\/$/, '');
100
- const API_TIMEOUT_MS = Number(process.env.IMPECCABLE_API_TIMEOUT || 4000);
101
- // All API calls in one seed run share a single deadline so an unreachable
102
- // network degrades after one timeout total, never one timeout per call.
103
- let apiDeadline = null;
104
- function apiBudgetMs() {
105
- if (apiDeadline === null) apiDeadline = Date.now() + API_TIMEOUT_MS;
106
- return Math.max(0, apiDeadline - Date.now());
107
- }
108
-
109
- const localStates = new Map();
110
- function loadLocal(catalogDir = CATALOG_DIR) {
111
- if (localStates.has(catalogDir)) return localStates.get(catalogDir);
112
- let localState;
113
- try {
114
- const catalogState = readConceptCatalog(
115
- join(catalogDir, 'concept-ingredients.json'),
116
- join(catalogDir, 'concept-reviews.json')
117
- );
118
- const validation = validateConceptCatalog(catalogState.catalog, catalogState.reviewData);
119
- if (validation.errors.length > 0) {
120
- throw new Error(`invalid catalog: ${validation.errors.join('; ')}`);
121
- }
122
- const compositionState = readCompositionCatalog(
123
- join(catalogDir, 'composition-ingredients.json'),
124
- join(catalogDir, 'composition-reviews.json')
125
- );
126
- localState = {
127
- concepts: catalogState.concepts,
128
- compositions: compositionState.compositions,
129
- };
130
- } catch {
131
- localState = null;
132
- }
133
- localStates.set(catalogDir, localState);
134
- return localState;
135
- }
136
-
137
- function requireLocalConcepts() {
138
- const local = loadLocal();
139
- if (!local) {
140
- throw new Error('concept-seed: no local catalog (set IMPECCABLE_CATALOG_DIR or pass sourceConcepts)');
141
- }
142
- return local;
143
- }
144
-
145
- async function fetchRoll({ scope, key, mode, grain, platform, reroll }) {
146
- const params = new URLSearchParams({ scope, key, reroll: String(reroll) });
147
- if (mode) params.set('mode', mode);
148
- if (grain) params.set('grain', grain);
149
- if (platform) params.set('platform', platform);
150
- const controller = new AbortController();
151
- const timer = setTimeout(() => controller.abort(), apiBudgetMs());
152
- try {
153
- // Race the budget explicitly: abort signals do not reliably cancel the
154
- // TCP connect phase, so a blackholed route would otherwise stall ~10s.
155
- const response = await Promise.race([
156
- fetch(`${API_BASE}/roll?${params}`, { signal: controller.signal }),
157
- new Promise(resolveTimeout => setTimeout(() => resolveTimeout(null), apiBudgetMs())),
158
- ]);
159
- if (!response) return null;
160
- if (!response.ok) return null;
161
- const roll = await response.json();
162
- if (!Array.isArray(roll.challengers) || roll.challengers.length === 0) return null;
163
- return roll;
164
- } catch {
165
- return null;
166
- } finally {
167
- clearTimeout(timer);
168
- }
169
- }
170
-
171
- function telemetryDisabled() {
172
- return Boolean(process.env.IMPECCABLE_NO_TELEMETRY || process.env.DO_NOT_TRACK);
173
- }
174
-
175
- // Anonymous choice ping: records only that a dealt world was selected.
176
- // Fire-and-forget; never fails the caller.
177
- export async function pingChosen({ chosenId, key, scope, mode }) {
178
- if (telemetryDisabled() || !chosenId) return false;
179
- const controller = new AbortController();
180
- const timer = setTimeout(() => controller.abort(), apiBudgetMs());
181
- try {
182
- await fetch(`${API_BASE}/chosen`, {
183
- method: 'POST',
184
- headers: { 'Content-Type': 'application/json' },
185
- body: JSON.stringify({ chosenId, key, scope, mode }),
186
- signal: controller.signal,
187
- });
188
- return true;
189
- } catch {
190
- return false;
191
- } finally {
192
- clearTimeout(timer);
193
- }
194
- }
195
-
196
- const CARD_BASE = process.env.IMPECCABLE_CARD_BASE || 'https://impeccable.style/worlds/cards';
197
-
198
- export function renderChallenger(concept, index) {
199
- const system = concept.system.map(rule => ` - ${rule}`).join('\n');
200
- const board = concept.cardBoard || `${CARD_BASE}/${concept.id}.webp`;
201
- const hero = concept.cardHero || `${CARD_BASE}/${concept.id}-hero.webp`;
202
- return ` ${index + 1}. ${concept.form}
203
- SOURCE ID: ${concept.id}
204
- CREATIVE SPARK: ${concept.spark}
205
- SYSTEM GRAMMAR:
206
- ${system}
207
- WEB LEVERAGE: ${concept.webLeverage}
208
- QUALITY BAR: board ${board} · hero ${hero}`;
209
- }
210
-
211
- export function renderComposition(composition, index = null) {
212
- const grammar = composition.grammar.map(rule => ` - ${rule}`).join('\n');
213
- return ` ${index == null ? '' : `${index + 1}. `}${composition.form}
214
- SOURCE ID: ${composition.id}
215
- SPARK: ${composition.spark}
216
- COMPOSITION GRAMMAR:
217
- ${grammar}
218
- WEB LEVERAGE: ${composition.webLeverage}`;
219
- }
220
-
221
- // Selection itself lives in lib/roll-selection.mjs so this script and the roll
222
- // API run one algorithm rather than two that drifted. These wrappers add only
223
- // what is local to the skill: resolving the catalog when no pool is passed, and
224
- // driving the generator with Node's synchronous hash, which keeps a local render
225
- // synchronous for prepared eval sessions and tests.
226
- function driveSelection(generator) {
227
- return runSyncSelection(generator, input => crypto.createHash('sha256').update(input).digest('hex'));
228
- }
229
-
230
- export function dealCompositions({ scope, key, reroll = 0, mode = null, grain = null, platform = null, sourceCompositions = null, count = 3 }) {
231
- const compositions = sourceCompositions ?? requireLocalConcepts().compositions;
232
- return driveSelection(selectApprovedCompositionsCore({ scope, key, reroll, mode, grain, platform, compositions, count }));
233
- }
234
-
235
- // Array-returning form, which is what every caller wanted before the match
236
- // report existed.
237
- export function selectApprovedCompositions(options) {
238
- return dealCompositions(options).picks;
239
- }
240
-
241
- // Compatibility for callers that need a single smoke-test sample.
242
- export function selectApprovedComposition(options) {
243
- return selectApprovedCompositions({ ...options, count: 1 })[0] ?? null;
244
- }
245
-
246
- export function selectApprovedChallengers({ scope, key, reroll = 0, mode = null, sourceConcepts = null }) {
247
- const source = sourceConcepts ?? requireLocalConcepts().concepts;
248
- const { approved, picks } = driveSelection(selectApprovedChallengersCore({ scope, key, reroll, mode, concepts: source }));
249
- return {
250
- approved,
251
- picks,
252
- poolRevision: approvedPoolRevision(source),
253
- catalogCount: source.length,
254
- };
255
- }
256
-
257
- const SEED_MODES = new Set(['persuade', 'operate', 'read', 'experience']);
258
-
259
- export function renderConceptSeed({
260
- scope = 'surface',
261
- key = process.env.IMPECCABLE_CONCEPT_SEED || crypto.randomBytes(4).toString('hex'),
262
- reroll = 0,
263
- mode = null,
264
- grain = null,
265
- platform = null,
266
- candidateCount = 7,
267
- catalogDir = CATALOG_DIR,
268
- _resolvedData = undefined,
269
- } = {}) {
270
- if (scope !== 'surface' && scope !== 'direction') {
271
- throw new Error('concept-seed: --scope must be direction or surface');
272
- }
273
- if (!Number.isInteger(reroll) || reroll < 0) {
274
- throw new Error('concept-seed: --reroll must be a non-negative integer');
275
- }
276
- if (mode !== null && !SEED_MODES.has(mode)) {
277
- throw new Error('concept-seed: --mode must be persuade, operate, read, or experience');
278
- }
279
- // Grain needs no mode: how much of the product is in play is independent of
280
- // which register of work it is.
281
- if (grain !== null && !COMPOSITION_GRAINS.includes(grain)) {
282
- throw new Error(`concept-seed: --grain must be one of ${COMPOSITION_GRAINS.join(', ')}`);
283
- }
284
- if (platform !== null && !COMPOSITION_PLATFORMS.includes(platform)) {
285
- throw new Error(`concept-seed: --platform must be one of ${COMPOSITION_PLATFORMS.join(', ')}`);
286
- }
287
- if (!Number.isInteger(candidateCount) || candidateCount < 5 || candidateCount > 7) {
288
- throw new Error('concept-seed: --candidate-count must be an integer from 5 to 7');
289
- }
290
- const unit = (salt) => {
291
- const h = crypto.createHash('sha256').update(`${scope}:${salt}:${key}`).digest();
292
- return h.readUInt32BE(0) / 0xffffffff;
293
- };
294
- const indexSalt = reroll === 0 ? 'index' : `index:reroll-${reroll}`;
295
- const buildIndex = 3 + Math.floor(unit(indexSalt) * (candidateCount - 2)); // 3..candidateCount
296
-
297
- // Local catalog first (private repo, evals, tests), then the roll API,
298
- // then a degraded assignment-only seed. The assigned index is pure local
299
- // math, so even a fully offline run keeps the anti-argmax mechanism.
300
- let data = _resolvedData ?? null;
301
- if (_resolvedData === undefined) {
302
- const local = loadLocal(catalogDir);
303
- if (local) {
304
- const { approved, picks, poolRevision, catalogCount } = selectApprovedChallengers({
305
- scope,
306
- key,
307
- reroll,
308
- mode,
309
- sourceConcepts: local.concepts,
310
- });
311
- data = {
312
- source: 'local',
313
- poolRevision,
314
- approvedCount: approved.length,
315
- catalogCount,
316
- challengers: picks,
317
- ...(() => {
318
- const dealt = dealCompositions({ scope, key, reroll, mode, grain, platform, sourceCompositions: local.compositions });
319
- return { compositions: dealt.picks, compositionMatch: dealt.match };
320
- })(),
321
- };
322
- } else {
323
- // Keep local renders synchronous for prepared eval sessions and tests;
324
- // installed skills without a bundled catalog resolve through the API.
325
- return fetchRoll({ scope, key, mode, grain, platform, reroll }).then(roll => renderConceptSeed({
326
- scope,
327
- key,
328
- reroll,
329
- mode,
330
- grain,
331
- platform,
332
- candidateCount,
333
- catalogDir,
334
- _resolvedData: roll ? {
335
- source: 'api',
336
- poolRevision: roll.poolRevision,
337
- approvedCount: roll.approvedCount,
338
- catalogCount: roll.catalogCount,
339
- challengers: roll.challengers,
340
- compositions: Array.isArray(roll.compositions)
341
- ? roll.compositions
342
- : Array.isArray(roll.stagings)
343
- ? roll.stagings
344
- : roll.staging ? [roll.staging] : [],
345
- } : null,
346
- }));
347
- }
348
- }
349
-
350
- const promotedInstruction = scope === 'direction'
351
- ? `After ordering the grounded directions by resonance, build candidate
352
- ${buildIndex} of your own grounded list; the assignment never points at a
353
- challenger. The assignment is the roll, not a suggestion: your top-ranked
354
- direction is what every run would ship, so the script decides which grounded
355
- direction gets built. Each direction joins a durable visual system to a
356
- concrete expression for the requested first surface, decided as one. It must
357
- survive the current task plus navigation, quiet and dense content,
358
- interaction and state, and a substantially different future surface. In an
359
- attended run, present the assigned direction fully committed and offer
360
- re-roll; never present a ranked lineup to choose from. Re-roll yourself only
361
- on named factual grounds, when the assignment cannot carry the product's
362
- truth or task; taste is never grounds.`
363
- : `After ordering the task's grounded structural candidates by resonance,
364
- build candidate ${buildIndex} of your own grounded list; the assignment never
365
- points at a challenger. The assignment is the roll, not a suggestion.
366
- In an attended run, present the assigned structure and offer re-roll; never
367
- present a ranked lineup to choose from. Re-roll yourself only when the
368
- assignment fails audience identification or product clarity on named
369
- factual grounds.`;
370
-
371
- const challengerInstruction = scope === 'direction'
372
- ? `Fuse each challenger before judging it: the challenger supplies the form
373
- and its system grammar, the product supplies every fact, and clarity wins
374
- conflicts. Weigh the fused result against the assigned direction on exactly
375
- two axes, audience identification and product clarity. Losing to strong
376
- grounded material is a valid outcome; beating a thin or tool-monoculture
377
- list is the point. A fused challenger that wins both axes becomes the build.`
378
- : `A challenger wins only when its fused result beats the grounded list on
379
- audience identification and product clarity. It may change task topology or
380
- interaction, but never the committed visual identity.`;
381
-
382
- const authorityInstruction = scope === 'direction'
383
- ? `PRODUCT.md and explicit incumbent brand commitments constrain every direction.
384
- The seed never chooses exact colors, fonts, tokens, or a user preference, and
385
- it never permits the world and first surface to be selected independently.`
386
- : `PRODUCT.md and DESIGN.md constrain every surface candidate's identity
387
- vocabulary; they do not cancel task-level composition. The seed never
388
- authorizes a new palette, type system, material world, or unfamiliar control
389
- behavior.`;
390
-
391
- const richnessInstruction = `The CREATIVE SPARK is a complete visual system, not a theme or decorative
392
- reference. Translate every supplied system rule into the product: palette and
393
- material, type and composition, topology, controls and states, and adaptation.
394
- Keep the source's visible character, scale, rhythm, and interaction instead of
395
- reducing vivid grammar to generic nouns. When the source is already a credible
396
- interface language, commit to it across navigation, content, controls, and
397
- states. Otherwise keep a literal carrier only when it becomes functional.
398
- Ambitious motion, spatial media, or interaction is welcome when it strengthens
399
- the product without weakening semantics, performance, or fallback behavior.`;
400
-
401
- if (!data) {
402
- return `${scope.toUpperCase()} CONCEPT SEED (key: ${key}; mode: ${mode ?? 'unscoped'}; source: degraded; rerun with --scope ${scope}${mode ? ` --mode ${mode}` : ''} --from ${key}${reroll > 0 ? ` --reroll ${reroll}` : ''} --candidate-count ${candidateCount})
403
- ASSIGNED INDEX: ${buildIndex}
404
- ${promotedInstruction}
405
- The assignment exists to refuse the model's ranking rut, never to outrank
406
- the user or the brief. Never expose assignment metadata in user-facing labels.
407
- No challengers this run: the roll service was unreachable and no local
408
- catalog exists. A sandboxed shell without network egress is the most common
409
- cause; before accepting degradation, rerun this command once through the
410
- harness's network-enabled or escalated command tool. When that rerun needs
411
- an approval, state exactly what the approver must know: this script's only
412
- network contact is one GET to https://impeccable.style/api/roll whose query
413
- carries scope, mode, an eight-hex seed key, and a re-roll counter; no
414
- project files, prompts, code, or conversation context are transmitted, and
415
- nothing is written. An approval request naming that URL and payload judges
416
- the real action; a bare "run with network" invites rejection for contacting
417
- an unspecified domain. If the rerun is still refused, proceed with the
418
- grounded candidates alone; the assignment above still applies at full
419
- strength. Tell the user plainly that this roll
420
- ran degraded, with no challengers and no quality-bar boards; do not present
421
- the outcome as a full roll. A degraded roll changes the cards, not the
422
- channel: when a browser can open, present the direction on the decision page
423
- (serve-question.mjs, text-only card); the structured question tool remains
424
- the no-browser fallback.
425
- ${authorityInstruction}
426
- A user- or brief-pinned decision beats the roll, always.
427
- ASSIGNED INDEX (restated for truncated readers): ${buildIndex}. Build candidate
428
- ${buildIndex} of your own grounded list; seed key ${key}.
429
- `;
430
- }
431
-
432
- // Field order is the migration: `compositions` is current, `stagings` is what
433
- // the API emitted while these were called stagings, and `staging` is the
434
- // single-pick shape from before it dealt three. Older installs keep working.
435
- // Compositions are pulled from the deal until the expanded catalog is
436
- // ready for prime time: the current pool crowds the decision more than it
437
- // widens it. IMPECCABLE_COMPOSITIONS=1 re-enables rendering for catalog
438
- // development; the draw machinery, axes, and grain report stay intact.
439
- const compositionsEnabled = process.env.IMPECCABLE_COMPOSITIONS === '1';
440
- const compositions = !compositionsEnabled ? []
441
- : Array.isArray(data.compositions)
442
- ? data.compositions
443
- : Array.isArray(data.stagings)
444
- ? data.stagings
445
- : data.staging ? [data.staging] : [];
446
- // The grain report. A top-up keeps the deal at three, which is right, but it
447
- // must not read as three on-target inputs: a flow request answered entirely by
448
- // view-grain compositions means the model has to derive the flow's own
449
- // structure and borrow only their sequence law. Silence here would reproduce
450
- // the exact failure this axis exists to fix.
451
- const match = data.compositionMatch ?? null;
452
- const grainNote = (() => {
453
- if (!match?.grain) return '';
454
- if (match.grainAvailable === 0) {
455
- return `\nNONE of these sit at the requested ${match.grain} grain, because the catalog holds no ${match.grain}-grain composition yet. Derive that structure yourself and borrow only their sequence and attention laws.`;
456
- }
457
- if (match.atGrain === 0) {
458
- return `\nNONE of these sit at the requested ${match.grain} grain, though ${match.grainAvailable} exist; these were topped up from the rest of the register. Treat their structure as borrowed.`;
459
- }
460
- if (match.atGrain < compositions.length) {
461
- return `\n${match.atGrain} of ${compositions.length} sit at the requested ${match.grain} grain; the rest were topped up from the register and their structure is borrowed.`;
462
- }
463
- return '';
464
- })();
465
- const compositionBlock = compositions.length > 0
466
- ? `\n${scope === 'direction' ? 'FIRST-SURFACE COMPOSITION INPUTS (identity-free; test them with shortlisted worlds and keep world plus composition one decision):' : 'COMPOSITION CHALLENGERS (identity-free; dress them in the committed visual identity before judging):'}
467
- ${compositions.map((composition, index) => renderComposition(composition, index)).join('\n')}
468
- Each one asks the same question of this build: what is the cleverest way to
469
- present, organize, or make interactive the problem in front of you? They carry
470
- structure only, never a palette, typeface, or material. Treat them as serious
471
- rivals to your habitual layout, and keep only what makes this product clearer.${grainNote}\n`
472
- : '';
473
- const rerollBlock = reroll > 0
474
- ? `RE-ROLL ROUND ${reroll}: every candidate presented in earlier rounds, grounded
475
- and challenger alike, is eliminated and may not return reworded. Derive
476
- genuinely new grounded candidates from unexplored angles before judging
477
- these fresh challengers.\n`
478
- : '';
479
- const telemetryBlock = data.source === 'api'
480
- ? `TELEMETRY: if the resolved direction uses one of these challengers, rerun
481
- this script once with --chosen <challenger-id> --from ${key} --scope ${scope}${mode ? ` --mode ${mode}` : ''}
482
- after resolution. The ping is anonymous (chosen id only) and is skipped
483
- automatically when DO_NOT_TRACK or IMPECCABLE_NO_TELEMETRY is set.\n`
484
- : '';
485
- return `${scope.toUpperCase()} CONCEPT SEED (key: ${key}; mode: ${mode ?? 'unscoped'}; source: ${data.source}; approved pool: ${data.poolRevision}; ${data.approvedCount}/${data.catalogCount} human-approved; rerun with --scope ${scope}${mode ? ` --mode ${mode}` : ''} --from ${key}${reroll > 0 ? ` --reroll ${reroll}` : ''} --candidate-count ${candidateCount} to reproduce this roll against this catalog revision)
486
- ${rerollBlock}ASSIGNED INDEX: ${buildIndex}
487
- ${promotedInstruction}
488
- The assignment exists to refuse the model's ranking rut, never to outrank
489
- the user or the brief. Never expose assignment metadata in user-facing labels.
490
- CHALLENGERS:
491
- ${data.challengers.map(renderChallenger).join('\n')}
492
- ${compositionBlock}${challengerInstruction}
493
- When you can view images, open the QUALITY BAR board and hero for any
494
- challenger you weigh seriously and for the world you build. They exist as a
495
- craft bar, the finish level and commitment the build is expected to reach,
496
- never as a mockup to copy; your surface serves this product, not that render.
497
- ${authorityInstruction}
498
- ${richnessInstruction}
499
- ${telemetryBlock}A user- or brief-pinned decision beats the roll, always.
500
- ASSIGNED INDEX (restated for truncated readers): ${buildIndex}. Build candidate
501
- ${buildIndex} of your own grounded list; seed key ${key}.
502
- `;
503
- }
504
-
505
- if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
506
- const args = process.argv.slice(2);
507
- const fromIdx = args.indexOf('--from');
508
- const scopeIdx = args.indexOf('--scope');
509
- const rerollIdx = args.indexOf('--reroll');
510
- const modeIdx = args.indexOf('--mode');
511
- const grainIdx = args.indexOf('--grain');
512
- const platformIdx = args.indexOf('--platform');
513
- const candidateCountIdx = args.indexOf('--candidate-count');
514
- const chosenIdx = args.indexOf('--chosen');
515
- try {
516
- if (chosenIdx !== -1) {
517
- // Choice ping: always exits 0, telemetry must never fail a design flow.
518
- const sent = await pingChosen({
519
- chosenId: args[chosenIdx + 1],
520
- key: fromIdx !== -1 ? args[fromIdx + 1] : undefined,
521
- scope: scopeIdx !== -1 ? args[scopeIdx + 1] : undefined,
522
- mode: modeIdx !== -1 ? args[modeIdx + 1] : undefined,
523
- });
524
- process.stdout.write(sent ? 'choice recorded\n' : 'choice ping skipped\n');
525
- } else {
526
- // Mechanical init gate: prose alone does not keep a model from dealing
527
- // before init, and fresh repos produced exactly that skip (the model
528
- // rolled directions with no PRODUCT.md, so nothing grounded the fusion).
529
- // The --chosen branch above stays ungated; telemetry never blocks.
530
- const { loadContext } = await import('./context.mjs');
531
- if (!loadContext(process.cwd()).hasProduct) {
532
- process.stdout.write([
533
- 'NO_PRODUCT_MD: the dice stay in the cup until product truth exists.',
534
- 'Complete the init ask round and write PRODUCT.md first (reference/init.md), then re-run this exact command.',
535
- 'Challengers fuse their form with facts from PRODUCT.md; without it every direction is ungrounded.',
536
- ].join(' ') + '\n');
537
- process.exit(1);
538
- }
539
- process.stdout.write(await renderConceptSeed({
540
- scope: scopeIdx !== -1 ? args[scopeIdx + 1] : 'surface',
541
- key: fromIdx !== -1
542
- ? args[fromIdx + 1]
543
- : (process.env.IMPECCABLE_CONCEPT_SEED || crypto.randomBytes(4).toString('hex')),
544
- reroll: rerollIdx !== -1 ? Number(args[rerollIdx + 1]) : 0,
545
- mode: modeIdx !== -1 ? args[modeIdx + 1] : null,
546
- grain: grainIdx !== -1 ? args[grainIdx + 1] : null,
547
- platform: platformIdx !== -1 ? args[platformIdx + 1] : null,
548
- candidateCount: candidateCountIdx !== -1 ? Number(args[candidateCountIdx + 1]) : 7,
549
- }));
550
- }
551
- } catch (error) {
552
- process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
553
- process.exitCode = 1;
554
- }
555
- // A raced-out fetch may still hold a socket; exit explicitly so the CLI
556
- // never lingers on a dead network path after output is written.
557
- process.exit(process.exitCode ?? 0);
558
- }