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,458 +0,0 @@
1
- /**
2
- * Pure helpers for live-mode insert UI (browser + tests).
3
- * Kept separate from live-browser.js so insert logic is unit-testable.
4
- */
5
-
6
- export const PLACEHOLDER_DEFAULT_HEIGHT = 80;
7
- export const PLACEHOLDER_MIN_HEIGHT = 48;
8
- export const PLACEHOLDER_MIN_WIDTH = 120;
9
-
10
- /** @typedef {'before' | 'after'} InsertPosition */
11
- /** @typedef {'row' | 'column'} InsertAxis */
12
-
13
- /**
14
- * Infer sibling flow axis from a container's computed layout styles.
15
- * @param {{ display?: string, flexDirection?: string, gridTemplateColumns?: string, gridAutoFlow?: string }} style
16
- * @returns {InsertAxis}
17
- */
18
- export function detectInsertAxisFromStyle(style) {
19
- const display = style?.display || 'block';
20
- if (display.includes('flex')) {
21
- const dir = style.flexDirection || 'row';
22
- return dir.startsWith('row') ? 'row' : 'column';
23
- }
24
- if (display === 'grid' || display === 'inline-grid') {
25
- const flow = style.gridAutoFlow || 'row';
26
- if (flow.includes('column')) return 'column';
27
- const cols = (style.gridTemplateColumns || '').trim();
28
- if (cols && cols !== 'none') {
29
- const colCount = cols.split(/\s+/).filter(Boolean).length;
30
- if (colCount > 1) return 'row';
31
- }
32
- return 'row';
33
- }
34
- return 'column';
35
- }
36
-
37
- /**
38
- * Pick insertion side from pointer position against an anchor element box.
39
- * @param {number} clientX
40
- * @param {number} clientY
41
- * @param {{ top: number, left: number, width: number, height: number, bottom?: number, right?: number }} rect
42
- * @param {InsertAxis} [axis]
43
- * @returns {InsertPosition}
44
- */
45
- export function computeInsertPosition(clientX, clientY, rect, axis = 'column') {
46
- if (!rect) return 'after';
47
- if (axis === 'row') {
48
- if (!Number.isFinite(rect.left) || !Number.isFinite(rect.width) || rect.width <= 0) return 'after';
49
- const mid = rect.left + rect.width / 2;
50
- return clientX < mid ? 'before' : 'after';
51
- }
52
- if (!Number.isFinite(rect.top) || !Number.isFinite(rect.height) || rect.height <= 0) return 'after';
53
- const mid = rect.top + rect.height / 2;
54
- return clientY < mid ? 'before' : 'after';
55
- }
56
-
57
- /**
58
- * Whether Create is allowed for an insert session.
59
- * Requires a non-empty prompt OR at least one annotation.
60
- */
61
- export function canCreateInsert({ prompt, comments, strokes }) {
62
- const hasPrompt = typeof prompt === 'string' && prompt.trim().length > 0;
63
- const hasComments = Array.isArray(comments) && comments.length > 0;
64
- const hasStrokes = Array.isArray(strokes) && strokes.some(
65
- (s) => Array.isArray(s?.points) && s.points.length >= 2,
66
- );
67
- return hasPrompt || hasComments || hasStrokes;
68
- }
69
-
70
- /** Tooltip/title when Create is disabled. */
71
- export function insertCreateDisabledReason({ prompt, comments, strokes }) {
72
- if (canCreateInsert({ prompt, comments, strokes })) return null;
73
- return 'Add a prompt or annotate the placeholder to create';
74
- }
75
-
76
- /**
77
- * Fixed-position insert line coordinates (viewport px).
78
- * @param {{ top: number, left: number, width: number, height: number, bottom?: number, right?: number }} rect
79
- * @param {InsertPosition} position
80
- * @param {InsertAxis} [axis]
81
- */
82
- export function insertLineCoords(rect, position, axis = 'column') {
83
- if (axis === 'row') {
84
- const right = rect.right ?? rect.left + rect.width;
85
- const x = position === 'before' ? rect.left - 2 : right + 2;
86
- return { axis: 'row', top: rect.top, left: x, width: 0, height: rect.height };
87
- }
88
- const bottom = rect.bottom ?? rect.top + rect.height;
89
- const y = position === 'before' ? rect.top - 2 : bottom + 2;
90
- return { axis: 'column', top: y, left: rect.left, width: rect.width, height: 0 };
91
- }
92
-
93
- /** Cursor while hovering an insert boundary. */
94
- export function cursorForInsertAxis(axis) {
95
- return axis === 'row' ? 'ew-resize' : 'ns-resize';
96
- }
97
-
98
- function groupSiblingRows(siblings, rowThreshold = 8) {
99
- const sorted = [...siblings].sort((a, b) => a.rect.top - b.rect.top || a.rect.left - b.rect.left);
100
- const rows = [];
101
- for (const entry of sorted) {
102
- let placed = false;
103
- for (const row of rows) {
104
- if (Math.abs(entry.rect.top - row[0].rect.top) <= rowThreshold) {
105
- row.push(entry);
106
- placed = true;
107
- break;
108
- }
109
- }
110
- if (!placed) rows.push([entry]);
111
- }
112
- return rows;
113
- }
114
-
115
- function horizontalOverlap(a, b) {
116
- const left = Math.max(a.left, b.left);
117
- const right = Math.min(a.right ?? a.left + a.width, b.right ?? b.left + b.width);
118
- return Math.max(0, right - left);
119
- }
120
-
121
- /**
122
- * Hit-test the gap between adjacent siblings (flex rows, grid columns, stacked blocks).
123
- * @param {number} clientX
124
- * @param {number} clientY
125
- * @param {Array<{ el: unknown, rect: { top: number, left: number, width: number, height: number, bottom?: number, right?: number } }>} siblings
126
- * @param {{ slop?: number, minOverlap?: number }} [opts]
127
- */
128
- export function hitSiblingInsertGap(clientX, clientY, siblings, opts = {}) {
129
- if (!Array.isArray(siblings) || siblings.length < 2) return null;
130
- const slop = opts.slop ?? 12;
131
- const minOverlap = opts.minOverlap ?? 0.25;
132
-
133
- for (const row of groupSiblingRows(siblings)) {
134
- if (row.length < 2) continue;
135
- const sorted = [...row].sort((a, b) => a.rect.left - b.rect.left);
136
- for (let i = 0; i < sorted.length - 1; i++) {
137
- const a = sorted[i];
138
- const b = sorted[i + 1];
139
- const aRight = a.rect.right ?? a.rect.left + a.rect.width;
140
- const bLeft = b.rect.left;
141
- if (bLeft <= aRight) continue;
142
- const top = Math.max(a.rect.top, b.rect.top);
143
- const aBottom = a.rect.bottom ?? a.rect.top + a.rect.height;
144
- const bBottom = b.rect.bottom ?? b.rect.top + b.rect.height;
145
- const bottom = Math.min(aBottom, bBottom);
146
- const span = bottom - top;
147
- const minH = Math.min(a.rect.height, b.rect.height);
148
- if (span < minH * minOverlap) continue;
149
-
150
- const inX = clientX >= aRight - slop && clientX <= bLeft + slop;
151
- const inY = clientY >= top - slop && clientY <= bottom + slop;
152
- if (!inX || !inY) continue;
153
-
154
- const midX = (aRight + bLeft) / 2;
155
- return {
156
- anchor: b.el,
157
- position: 'before',
158
- axis: 'row',
159
- line: { axis: 'row', left: midX, top, width: 0, height: span },
160
- };
161
- }
162
- }
163
-
164
- const sortedCol = [...siblings].sort((a, b) => a.rect.top - b.rect.top || a.rect.left - b.rect.left);
165
- for (let i = 0; i < sortedCol.length - 1; i++) {
166
- const a = sortedCol[i];
167
- const b = sortedCol[i + 1];
168
- const overlap = horizontalOverlap(a.rect, b.rect);
169
- const minW = Math.min(a.rect.width, b.rect.width);
170
- if (overlap < minW * minOverlap) continue;
171
-
172
- const aBottom = a.rect.bottom ?? a.rect.top + a.rect.height;
173
- const gapTop = aBottom;
174
- const gapBottom = b.rect.top;
175
- if (gapBottom <= gapTop) continue;
176
-
177
- const overlapLeft = Math.max(a.rect.left, b.rect.left);
178
- const overlapRight = Math.min(
179
- a.rect.right ?? a.rect.left + a.rect.width,
180
- b.rect.right ?? b.rect.left + b.rect.width,
181
- );
182
- const inY = clientY >= gapTop - slop && clientY <= gapBottom + slop;
183
- const inX = clientX >= overlapLeft - slop && clientX <= overlapRight + slop;
184
- if (!inY || !inX) continue;
185
-
186
- const midY = (gapTop + gapBottom) / 2;
187
- return {
188
- anchor: b.el,
189
- position: 'before',
190
- axis: 'column',
191
- line: { axis: 'column', top: midY, left: overlapLeft, width: overlap, height: 0 },
192
- };
193
- }
194
-
195
- return null;
196
- }
197
-
198
- /**
199
- * Resolve insert hover target, side, axis, and indicator line for the pointer.
200
- */
201
- export function resolveInsertHover({ clientX, clientY, target, rect, axis, siblings }) {
202
- const gap = hitSiblingInsertGap(clientX, clientY, siblings);
203
- if (gap) return gap;
204
-
205
- const position = computeInsertPosition(clientX, clientY, rect, axis);
206
- const line = insertLineCoords(rect, position, axis);
207
- return { anchor: target, position, axis, line };
208
- }
209
-
210
- /**
211
- * How the in-flow placeholder should participate in layout.
212
- * Prefer implicit sizing (flex / %) so row inserts don't inherit the full parent width in px.
213
- * @returns {{ kind: 'flex', flex: string, minWidth: number } | { kind: 'percent' } | { kind: 'auto' } | { kind: 'explicit', width: number }}
214
- */
215
- export function placeholderSizing({ axis, parentDisplay, parentWidth, anchorFlex }) {
216
- const display = parentDisplay || 'block';
217
- const w = Number.isFinite(parentWidth) ? parentWidth : 0;
218
-
219
- if (axis === 'row') {
220
- if (display.includes('flex')) {
221
- const flex = anchorFlex && anchorFlex !== 'none' && anchorFlex !== '0 1 auto'
222
- ? anchorFlex
223
- : '1 1 0';
224
- return { kind: 'flex', flex, minWidth: 0 };
225
- }
226
- if (display === 'grid' || display === 'inline-grid') {
227
- return { kind: 'auto' };
228
- }
229
- }
230
-
231
- if (w >= PLACEHOLDER_MIN_WIDTH) {
232
- return { kind: 'percent' };
233
- }
234
-
235
- return {
236
- kind: 'explicit',
237
- width: Math.max(PLACEHOLDER_MIN_WIDTH, w || PLACEHOLDER_MIN_WIDTH),
238
- };
239
- }
240
-
241
- /** Width kinds that need materializing to px before edge-resize. */
242
- export function placeholderWidthIsImplicit(kind) {
243
- return kind === 'flex' || kind === 'percent' || kind === 'auto';
244
- }
245
-
246
- /**
247
- * Clamp user-resized placeholder dimensions.
248
- */
249
- export function clampPlaceholderSize(width, height, parentWidth, opts = {}) {
250
- const minW = opts.minWidth ?? PLACEHOLDER_MIN_WIDTH;
251
- const minH = opts.minHeight ?? PLACEHOLDER_MIN_HEIGHT;
252
- const maxW = opts.maxWidth ?? Math.max(minW, parentWidth || minW);
253
- return {
254
- width: Math.min(maxW, Math.max(minW, Math.round(width))),
255
- height: Math.max(minH, Math.round(height)),
256
- };
257
- }
258
-
259
- /** CSS cursor for a placeholder edge resize handle. */
260
- export function cursorForPlaceholderEdge(edge) {
261
- if (edge === 'n' || edge === 's') return 'ns-resize';
262
- if (edge === 'e' || edge === 'w') return 'ew-resize';
263
- return 'default';
264
- }
265
-
266
- /**
267
- * Compute placeholder box after dragging one edge (in-flow margins shift for n/w).
268
- * @param {{ width: number, height: number, marginLeft?: number, marginTop?: number }} start
269
- * @param {'n'|'e'|'s'|'w'} edge
270
- * @param {number} dx pointer delta X since drag start
271
- * @param {number} dy pointer delta Y since drag start
272
- * @param {number} parentWidth
273
- */
274
- export function resizePlaceholderFromEdge(start, edge, dx, dy, parentWidth, opts = {}) {
275
- const base = {
276
- width: start.width,
277
- height: start.height,
278
- marginLeft: start.marginLeft ?? 0,
279
- marginTop: start.marginTop ?? 0,
280
- };
281
- if (edge === 'e') base.width = start.width + dx;
282
- else if (edge === 'w') {
283
- base.width = start.width - dx;
284
- base.marginLeft = start.marginLeft + dx;
285
- } else if (edge === 's') base.height = start.height + dy;
286
- else if (edge === 'n') {
287
- base.height = start.height - dy;
288
- base.marginTop = start.marginTop + dy;
289
- }
290
-
291
- const clamped = clampPlaceholderSize(base.width, base.height, parentWidth, opts);
292
- if (edge === 'w') {
293
- base.marginLeft = start.marginLeft + start.width - clamped.width;
294
- } else if (edge === 'n') {
295
- base.marginTop = start.marginTop + start.height - clamped.height;
296
- }
297
-
298
- return {
299
- width: clamped.width,
300
- height: clamped.height,
301
- marginLeft: Math.round(base.marginLeft),
302
- marginTop: Math.round(base.marginTop),
303
- };
304
- }
305
-
306
- /** Pick and insert toggles are independent but turning one ON turns the other OFF. */
307
- export function applyPickToggle(pickActive, insertActive) {
308
- const nextPick = !pickActive;
309
- return {
310
- pickActive: nextPick,
311
- insertActive: nextPick ? false : insertActive,
312
- };
313
- }
314
-
315
- export function applyInsertToggle(pickActive, insertActive) {
316
- const nextInsert = !insertActive;
317
- return {
318
- pickActive: nextInsert ? false : pickActive,
319
- insertActive: nextInsert,
320
- };
321
- }
322
-
323
- /**
324
- * Build the browser generate payload for insert mode.
325
- */
326
- export function buildInsertGeneratePayload({
327
- id,
328
- count,
329
- pageUrl,
330
- anchorContext,
331
- position,
332
- placeholder,
333
- freeformPrompt,
334
- comments,
335
- strokes,
336
- screenshotPath,
337
- }) {
338
- const payload = {
339
- type: 'generate',
340
- mode: 'insert',
341
- id,
342
- count,
343
- pageUrl,
344
- insert: {
345
- position,
346
- anchor: anchorContext,
347
- },
348
- placeholder,
349
- freeformPrompt: freeformPrompt?.trim() || undefined,
350
- };
351
- if (comments?.length) payload.comments = comments;
352
- if (strokes?.length) payload.strokes = strokes;
353
- if (screenshotPath) payload.screenshotPath = screenshotPath;
354
- return payload;
355
- }
356
-
357
- /**
358
- * Whether a variant wrapper is currently shown (handles `hidden` and display:none).
359
- * @param {{ hidden?: boolean, style?: { display?: string } } | null | undefined} el
360
- */
361
- export function isVariantShown(el) {
362
- if (!el) return false;
363
- if (el.hidden) return false;
364
- if (el.style?.display === 'none') return false;
365
- return true;
366
- }
367
-
368
- /**
369
- * Show or hide a variant wrapper for cycling.
370
- * @param {{ hidden?: boolean, style?: { display?: string }, removeAttribute?: (name: string) => void, setAttribute?: (name: string, value?: string) => void } | null | undefined} el
371
- * @param {boolean} shown
372
- */
373
- export function setVariantShown(el, shown) {
374
- if (!el) return;
375
- if (shown) {
376
- el.removeAttribute?.('hidden');
377
- if (el.style) el.style.display = '';
378
- } else {
379
- el.setAttribute?.('hidden', '');
380
- if (el.style) el.style.display = 'none';
381
- }
382
- }
383
-
384
- /**
385
- * Pick the best live anchor during an insert session (placeholder until variants land).
386
- * @param {{
387
- * wrapper?: unknown,
388
- * variantCount?: number,
389
- * visibleVariant?: number,
390
- * placeholder?: unknown,
391
- * insertAnchor?: unknown,
392
- * pickVariantContent?: (wrapper: unknown, index: number) => unknown,
393
- * }} opts
394
- */
395
- export function resolveInsertSessionAnchor(opts) {
396
- const {
397
- wrapper,
398
- variantCount = 0,
399
- visibleVariant = 0,
400
- placeholder,
401
- insertAnchor,
402
- pickVariantContent,
403
- } = opts || {};
404
- if (wrapper && variantCount > 0 && visibleVariant > 0 && pickVariantContent) {
405
- const vis = pickVariantContent(wrapper, visibleVariant);
406
- if (vis) return vis;
407
- }
408
- return placeholder || insertAnchor || null;
409
- }
410
-
411
- /**
412
- * Snapshot placeholder geometry + anchor fingerprint so HMR can recreate the box.
413
- * @param {{
414
- * tagName?: string,
415
- * className?: string,
416
- * textContent?: string,
417
- * }} anchor
418
- * @param {{
419
- * offsetWidth?: number,
420
- * offsetHeight?: number,
421
- * style?: { marginLeft?: string, marginTop?: string },
422
- * }} placeholder
423
- * @param {{ position: 'before' | 'after', layoutAxis?: 'row' | 'column' }} meta
424
- */
425
- export function buildInsertPlaceholderSnapshot(anchor, placeholder, { position, layoutAxis }) {
426
- return {
427
- width: Math.round(placeholder.offsetWidth || 0),
428
- height: Math.round(placeholder.offsetHeight || PLACEHOLDER_DEFAULT_HEIGHT),
429
- marginLeft: parseFloat(placeholder.style?.marginLeft || '') || 0,
430
- marginTop: parseFloat(placeholder.style?.marginTop || '') || 0,
431
- position,
432
- layoutAxis: layoutAxis || 'column',
433
- anchorTag: anchor.tagName || 'DIV',
434
- anchorClasses: anchor.className || '',
435
- anchorText: (anchor.textContent || '').trim().slice(0, 120),
436
- };
437
- }
438
-
439
- /**
440
- * Re-find an insert anchor after framework HMR replaced the live DOM node.
441
- * @param {Pick<Document, 'body' | 'querySelectorAll'>} doc
442
- * @param {ReturnType<typeof buildInsertPlaceholderSnapshot> | null | undefined} snapshot
443
- * @param {Element | null | undefined} liveAnchor
444
- */
445
- export function findInsertAnchorInDom(doc, snapshot, liveAnchor = null) {
446
- if (liveAnchor && doc.body.contains(liveAnchor)) return liveAnchor;
447
- if (!snapshot) return null;
448
- const tag = (snapshot.anchorTag || 'div').toLowerCase();
449
- const cls = (snapshot.anchorClasses || '').split(/\s+/).filter(Boolean)[0];
450
- const needle = snapshot.anchorText || '';
451
- const sel = cls ? `${tag}.${cls}` : tag;
452
- const candidates = doc.querySelectorAll(sel);
453
- for (const candidate of candidates) {
454
- if (needle && !(candidate.textContent || '').includes(needle.slice(0, 40))) continue;
455
- return candidate;
456
- }
457
- return null;
458
- }
@@ -1,142 +0,0 @@
1
- /**
2
- * Just-in-time agent instructions for live mode.
3
- *
4
- * The live scripts, not the reference doc, own situational plumbing: every
5
- * event printed by live-poll carries an `_instructions` string describing
6
- * exactly what to do NEXT, with real ids, paths, and line numbers already
7
- * substituted and only the active path's rules included (a svelte-component
8
- * session never sees JSX guidance, and vice versa). live.md stays lean: the
9
- * session contract, harness policy, and design-quality guidance that is not
10
- * situational (identity lock, variation axes, parameter budgets).
11
- *
12
- * Keep these strings imperative, concrete, and short. They are read by an
13
- * agent mid-session; every sentence must earn its tokens. Instructions are
14
- * versioned with the scripts, so they cannot drift from behavior the way a
15
- * hand-maintained doc can.
16
- */
17
-
18
- const PLAN_POINTER = 'Plan per live.md section 4: extract the identity lock, pick default vs departure mode, commit each variant to a DIFFERENT primary axis, squint-test the trio. Size parameter knobs per section 7 budgets.';
19
-
20
- function pollCmd(scriptsPath) {
21
- return `node ${scriptsPath}/live-poll.mjs`;
22
- }
23
-
24
- function replyCmd(scriptsPath, id, rest) {
25
- return `${pollCmd(scriptsPath)} --reply ${id} ${rest}`;
26
- }
27
-
28
- export function instructionsForEvent(event, { scriptsPath = '{{scripts_path}}' } = {}) {
29
- if (!event || typeof event !== 'object') return undefined;
30
- switch (event.type) {
31
- case 'generate':
32
- return generateInstructions(event, scriptsPath);
33
- case 'steer':
34
- return `Do what the message asks (page edits, navigation help, or a short answer). Then reply exactly once: ${replyCmd(scriptsPath, event.id, 'steer_done ["optional short toast"]')} (on failure: --reply ${event.id} error "Short reason"). No pickup ack; poll again immediately after.`;
35
- case 'prefetch':
36
- return `Speculative pre-read, no reply owed: resolve ${JSON.stringify(event.pageUrl || '/')} to its source file (root "/" is usually the boot's pageFile; multi-page sites map /foo to public/foo/index.html; SPAs map all routes to one entry), read it into context, then poll again. Skip if you cannot resolve it confidently.`;
37
- case 'variant_mount_failed':
38
- return `The browser could NOT render variant ${event.variant}${event.url ? ` (module: ${event.url})` : ''}${event.error ? `: ${String(event.error).slice(0, 200)}` : ''}. The user sees a persistent error card, not variants. Fix the variant source files, then reply ${replyCmd(scriptsPath, event.id, 'done --file <manifest or source path>')}; the browser retries on its own. Poll again after the reply.`;
39
- case 'accept':
40
- return acceptInstructions(event, scriptsPath);
41
- case 'discard':
42
- return event?._completionAck?.ok === true
43
- ? 'Original restored and durable completion acknowledged; nothing to do. Poll again.'
44
- : `Completion was not acknowledged: run node ${scriptsPath}/live-complete.mjs --id ${event.id} --discarded, then poll again.`;
45
- case 'manual_edit_apply':
46
- return `The user already clicked Apply; never ask, discard, or redirect. Delegate the source edits to the impeccable_manual_edit_applier subagent when available (pass cwd, scripts path, event id, page URL, chunk/deadline, batch, evidencePath); it must not poll or reply. ${event.repair ? 'A `repair` payload is present: the previous Apply changed source but validation failed; fix the CURRENT source, never roll back yourself. ' : ''}Reply exactly once: ${replyCmd(scriptsPath, event.id, `done --data '{"status":"done","appliedEntryIds":[...],"failed":[],"files":[...],"notes":[]}'`)} (status "partial"/"error" with failed[] when not every entry applied). Then poll again.`;
47
- case 'timeout':
48
- return 'No event arrived; poll again immediately.';
49
- case 'exit':
50
- return `Session over: kill any background poll, then node ${scriptsPath}/live-server.mjs stop (removes the injected script tag). Sweep leftover impeccable-variants-start / impeccable-carbonize-start markers from source.`;
51
- default:
52
- return undefined;
53
- }
54
- }
55
-
56
- function generateInstructions(event, scriptsPath) {
57
- const id = event.id;
58
- const scaffold = event.scaffold;
59
- const steps = [];
60
-
61
- if (event.screenshotPath) {
62
- steps.push(`Read the annotated screenshot first: ${event.screenshotPath}. Comment {x,y} positions bind text to the child under that point; strokes read by shape (loop = emphasis on this thing, arrow = direction, cross = delete).`);
63
- } else {
64
- steps.push('No screenshot was sent (the user did not annotate); do not ask for one and do not screenshot the page. Work from element.outerHTML, the computed styles, and the prompt.');
65
- }
66
-
67
- if (event.mode === 'insert') {
68
- steps.push(insertScaffoldInstructions(event, scriptsPath));
69
- } else if (scaffold?.previewMode === 'svelte-component') {
70
- steps.push(svelteComponentInstructions(event, scaffold, scriptsPath));
71
- } else if (scaffold && scaffold.sourceWritten === false) {
72
- steps.push(deferredWrapperInstructions(event, scaffold, scriptsPath));
73
- } else if (scaffold) {
74
- steps.push(`The wrapper is already written into ${scaffold.file}. Splice preview CSS plus all ${event.count} variants at line ${scaffold.insertLine} in ONE edit, following the returned cssAuthoring contract (styleTag, selector strategy, forbidden patterns). Each variant div holds exactly ONE top-level element (same tag as the original); first visible, others display: none.`);
75
- } else {
76
- steps.push(`Preflight could not scaffold${event.scaffoldError ? ` (${event.scaffoldError})` : ''}. Run node ${scriptsPath}/live-wrap.mjs --id ${id} --count ${event.count} --element-id "${event.element?.id || ''}" --classes "${(event.element?.classes || []).join(',')}" --tag "${event.element?.tagName || ''}" --text "<first ~80 chars of the picked element's textContent>". Keep the flags separate; --text disambiguates repeated siblings. On a fallback error, follow live.md's Handle fallback.`);
77
- }
78
-
79
- steps.push(event.action && event.action !== 'impeccable'
80
- ? `Action is "${event.action}": read reference/${event.action}.md before planning; its MUST params are non-negotiable. ${PLAN_POINTER}`
81
- : `Freeform action: work from SKILL.md rules plus craft-floor.md; no sub-command file. ${PLAN_POINTER}`);
82
-
83
- steps.push(`When all ${event.count} variants are delivered: ${replyCmd(scriptsPath, id, 'done --file <project-root-relative path you wrote>')}. Then poll again. If generation fails after the browser flipped to GENERATING, reply --reply ${id} error "Short reason" so the bar resets (never live-accept --discard for this).`);
84
-
85
- return steps.map((s, i) => `${i + 1}. ${s}`).join('\n');
86
- }
87
-
88
- function svelteComponentInstructions(event, scaffold, scriptsPath) {
89
- const dir = scaffold.componentDir;
90
- const count = event.count;
91
- return `Svelte component preview. EDIT the existing stubs ${dir}/v1.svelte ... v${count}.svelte in place; never delete or recreate them; do not read them back (the prop-substituted markup is in scaffold.componentStubMarkup). Keep the stub's control flow ({#each}, {#if}) and propContract prop names exactly; never flatten a loop into literal items. The stub <style> is seeded with the source rules that style the selection; restyle or delete freely, and know that any seeded rule you do not re-declare is REMOVED from source on accept (the preview never applied it). ALL your CSS goes inside that ONE existing <style> block: Svelte forbids a second top-level style element, and a publish with a non-compiling variant is bounced back to you with file and line. Semantic class selectors only: no @scope, no data-impeccable-* attributes. Params go in ${dir}/params.json keyed by variant number (never an attribute); author knob CSS against var(--p-<id>, default) and :global([data-p-<id>="..."]). Reply with --file ${scaffold.file}. Accept later merges everything into ${scaffold.sourceFile} mechanically; you have no post-accept cleanup.`;
92
- }
93
-
94
- function deferredWrapperInstructions(event, scaffold, scriptsPath) {
95
- const insertNote = Number(scaffold.replaceEndLine) < Number(scaffold.replaceStartLine)
96
- ? ` (replaceEndLine < replaceStartLine: this is an INSERTION at line ${scaffold.replaceStartLine}; remove nothing)`
97
- : '';
98
- return `The wrapper is NOT in source yet. In ONE edit to ${scaffold.file}: splice preview CSS plus all ${event.count} variants into scaffold.wrapperBlock at the "Variants: insert below this line" marker, then replace lines ${scaffold.replaceStartLine}-${scaffold.replaceEndLine}${insertNote} with the result. Two separate writes reload the framework mid-publish and strand the browser at 0/N. Author CSS per the returned cssAuthoring contract; each variant div holds exactly ONE top-level element (same tag as the original); first visible, others display: none. On JSX/TSX wrap the <style> content in a template literal and use className / style={{...}}.`;
99
- }
100
-
101
- function insertScaffoldInstructions(event, scriptsPath) {
102
- const scaffold = event.scaffold;
103
- const base = `Insert mode: net-new content sized around ${event.placeholder?.width || '?'}x${event.placeholder?.height || '?'} at the chosen anchor; load craft-floor.md before writing net-new markup.`;
104
- if (scaffold?.previewMode === 'svelte-component') {
105
- return `${base} Write each inserted variant as a single-root Svelte component under ${scaffold.componentDir} (no data-impeccable-* attributes, CSS in each component's <style>). Never edit the route during generation; reply with --file ${scaffold.file}.`;
106
- }
107
- if (scaffold && scaffold.sourceWritten === false) {
108
- return `${base} Splice your variants into scaffold.wrapperBlock at the marker and insert the result at line ${scaffold.replaceStartLine} of ${scaffold.file} in ONE edit.`;
109
- }
110
- return `${base} If no scaffold payload is present, run node ${scriptsPath}/live-insert.mjs --id ${event.id} --count ${event.count} --position ${event.insert?.position || 'after'} with the anchor flags from event.insert.anchor, then splice variants at the returned insertLine.`;
111
- }
112
-
113
- function acceptInstructions(event, scriptsPath) {
114
- const result = event._acceptResult || {};
115
- const ackOk = event._completionAck?.ok === true;
116
- const prefix = ackOk ? '' : `Completion was NOT acknowledged: run node ${scriptsPath}/live-status.mjs, finish any cleanup, then node ${scriptsPath}/live-complete.mjs --id ${event.id}. `;
117
-
118
- if (result.handled === true && result.carbonize === true) {
119
- return `${prefix}Carbonize cleanup is REQUIRED now, before the next poll, in ${result.file}: (1) locate the impeccable-carbonize-start/end block and read the impeccable-param-values comment; (2) move the CSS rules into the stylesheet that owns this area; (3) bake params while rewriting selectors (@scope wrappers to semantic classes, keep only the chosen data-p branch, substitute range literals); (4) unwrap the accepted content and drop every data-impeccable-* / data-p-* attribute; (5) delete the inline <style>, the param-values comment, and both markers plus dead @scope rules. Then run node ${scriptsPath}/live-complete.mjs --id ${event.id} and verify phase "completed"; it refuses with source_dirty while leftovers remain. Poll again only after that.`;
120
- }
121
- if (result.handled === true) {
122
- return `${prefix}Accept was merged into source mechanically; nothing to clean up. Poll again.`;
123
- }
124
- if (result.mode === 'fallback') {
125
- return `${prefix}The session lived in a generated file, so accept refused to persist there. Write the accepted variant into the true source you identified during Handle fallback, remove the temporary wrapper from the served file, then poll again.`;
126
- }
127
- if (result.mode === 'error') {
128
- if (result.error === 'source_locked') {
129
- return `${prefix}The source file is briefly locked by a publisher. Re-run the exact same live-accept.mjs command (idempotent); do NOT hand-edit the file, and do not poll past this.`;
130
- }
131
- if (result.error === 'accept_receipt_conflict') {
132
- return `${prefix}This session already resolved as ${result.priorOperation || 'a prior operation'}; do not edit anything. Run node ${scriptsPath}/live-status.mjs and tell the user what the session resolved to.`;
133
- }
134
- return `${prefix}Accept failed: ${result.error || 'unknown error'}. Source was not touched; do not hand-edit. Run node ${scriptsPath}/live-status.mjs before continuing.`;
135
- }
136
- return `${prefix}No mechanical accept result; read ${result.file || 'the session source file'}, find the impeccable markers, and finish the merge by hand. Poll again after.`;
137
- }
138
-
139
- /** Boot instructions attached to live.mjs's success payload. */
140
- export function bootInstructions({ scriptsPath = '{{scripts_path}}' } = {}) {
141
- return `Open the app URL that serves a pageFiles entry (never serverPort; that is the helper). Then start the poll loop per your harness policy in live.md and re-run ${pollCmd(scriptsPath)} immediately after every event or reply. Every event carries _instructions: follow them; they are the authoritative next step with real ids and paths filled in. A poll that is running is a poll you are SERVICING: never announce you are waiting and idle your turn; stay on the exec session until it returns an event, and never end a turn while a poll is outstanding.`;
142
- }