watchpot 0.0.0-stage → 1.0.0-rc.1

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 (1360) hide show
  1. package/.agents/README.md +26 -0
  2. package/.agents/skills/watchpot-features/SKILL.md +80 -0
  3. package/.agents/skills/watchpot-init/SKILL.md +217 -0
  4. package/.agents/skills/watchpot-init/references/build.md +127 -0
  5. package/.agents/skills/watchpot-init/references/examples/invention.ts +134 -0
  6. package/.agents/skills/watchpot-init/references/examples/shader-surface.tsx +90 -0
  7. package/.agents/skills/watchpot-init/references/examples/sim-and-tests.ts +50 -0
  8. package/.agents/skills/watchpot-init/references/look.md +60 -0
  9. package/.agents/skills/watchpot-init/references/shaders.md +141 -0
  10. package/.agents/skills/watchpot-init/references/systems.md +125 -0
  11. package/.agents/skills/watchpot-init/references/type.md +27 -0
  12. package/.agents/skills/watchpot-save/SKILL.md +65 -0
  13. package/.agents/skills/watchpot-sound/SKILL.md +77 -0
  14. package/CHANGELOG.md +573 -0
  15. package/LICENSE +21 -0
  16. package/README.md +125 -2
  17. package/api/core/achievements.d.ts +172 -0
  18. package/api/core/allocation.d.ts +138 -0
  19. package/api/core/annotate.d.ts +44 -0
  20. package/api/core/autobuyers.d.ts +91 -0
  21. package/api/core/board.d.ts +190 -0
  22. package/api/core/buffs.d.ts +139 -0
  23. package/api/core/cells.d.ts +58 -0
  24. package/api/core/challenges.d.ts +101 -0
  25. package/api/core/clicker.d.ts +128 -0
  26. package/api/core/clock-feature.d.ts +72 -0
  27. package/api/core/clock.d.ts +85 -0
  28. package/api/core/cost.d.ts +56 -0
  29. package/api/core/currencies.d.ts +137 -0
  30. package/api/core/decimal.d.ts +25 -0
  31. package/api/core/derived.d.ts +16 -0
  32. package/api/core/dimensions.d.ts +159 -0
  33. package/api/core/events/boards.d.ts +51 -0
  34. package/api/core/events/definition.d.ts +207 -0
  35. package/api/core/events/index.d.ts +5 -0
  36. package/api/core/events/regen.d.ts +24 -0
  37. package/api/core/events/runtime.d.ts +73 -0
  38. package/api/core/events/schedule.d.ts +33 -0
  39. package/api/core/feature-types.d.ts +228 -0
  40. package/api/core/feature.d.ts +53 -0
  41. package/api/core/fill.d.ts +8 -0
  42. package/api/core/fmt.d.ts +117 -0
  43. package/api/core/gacha/feature.d.ts +106 -0
  44. package/api/core/gacha/kernel.d.ts +50 -0
  45. package/api/core/game.d.ts +62 -0
  46. package/api/core/gauge.d.ts +121 -0
  47. package/api/core/generators.d.ts +217 -0
  48. package/api/core/graph/nodes.d.ts +67 -0
  49. package/api/core/graph/stats.d.ts +138 -0
  50. package/api/core/graph/yields.d.ts +17 -0
  51. package/api/core/index.d.ts +56 -0
  52. package/api/core/journal.d.ts +14 -0
  53. package/api/core/layers/check.d.ts +8 -0
  54. package/api/core/layers/feature.d.ts +63 -0
  55. package/api/core/layers/helpers.d.ts +12 -0
  56. package/api/core/layers/index.d.ts +6 -0
  57. package/api/core/layers/query.d.ts +113 -0
  58. package/api/core/layers/rules.d.ts +61 -0
  59. package/api/core/layers/types.d.ts +289 -0
  60. package/api/core/levels.d.ts +125 -0
  61. package/api/core/loadout.d.ts +156 -0
  62. package/api/core/market.d.ts +188 -0
  63. package/api/core/missions.d.ts +109 -0
  64. package/api/core/pace.d.ts +32 -0
  65. package/api/core/persist.d.ts +89 -0
  66. package/api/core/plain.d.ts +52 -0
  67. package/api/core/prefs.d.ts +48 -0
  68. package/api/core/prestige/prestige.d.ts +244 -0
  69. package/api/core/recipes.d.ts +140 -0
  70. package/api/core/records.d.ts +104 -0
  71. package/api/core/reset-rule.d.ts +33 -0
  72. package/api/core/rng.d.ts +15 -0
  73. package/api/core/save.d.ts +70 -0
  74. package/api/core/seen.d.ts +32 -0
  75. package/api/core/settings.d.ts +20 -0
  76. package/api/core/spawns.d.ts +153 -0
  77. package/api/core/stages.d.ts +126 -0
  78. package/api/core/stats.d.ts +105 -0
  79. package/api/core/steps.d.ts +81 -0
  80. package/api/core/storage.d.ts +94 -0
  81. package/api/core/store.d.ts +84 -0
  82. package/api/core/streak.d.ts +111 -0
  83. package/api/core/sweep.d.ts +128 -0
  84. package/api/core/tick.d.ts +38 -0
  85. package/api/core/time.d.ts +19 -0
  86. package/api/core/tree.d.ts +205 -0
  87. package/api/core/vocab.d.ts +94 -0
  88. package/api/core/watch.d.ts +80 -0
  89. package/api/core/world.d.ts +13 -0
  90. package/api/devtools/DevPanel.d.ts +12 -0
  91. package/api/devtools/SoundDesk.d.ts +48 -0
  92. package/api/devtools/desk/Arrangement.d.ts +1 -0
  93. package/api/devtools/desk/Devices.d.ts +7 -0
  94. package/api/devtools/desk/SoundDeskView.d.ts +17 -0
  95. package/api/devtools/desk/SourceDetail.d.ts +4 -0
  96. package/api/devtools/desk/Sources.d.ts +19 -0
  97. package/api/devtools/desk/Tracks.d.ts +23 -0
  98. package/api/devtools/desk/Tunables.d.ts +10 -0
  99. package/api/devtools/desk/Waveform.d.ts +16 -0
  100. package/api/devtools/desk/context.d.ts +47 -0
  101. package/api/devtools/desk/controls.d.ts +172 -0
  102. package/api/devtools/desk/layered.d.ts +86 -0
  103. package/api/devtools/desk/loop.d.ts +51 -0
  104. package/api/devtools/desk/model.d.ts +117 -0
  105. package/api/devtools/desk/prefs.d.ts +32 -0
  106. package/api/devtools/desk/samples.d.ts +70 -0
  107. package/api/devtools/desk/scale.d.ts +40 -0
  108. package/api/devtools/devTools.d.ts +24 -0
  109. package/api/devtools/gate.d.ts +8 -0
  110. package/api/devtools/index.d.ts +3 -0
  111. package/api/devtools/sampleHost.d.ts +10 -0
  112. package/api/kit/fx/Count.d.ts +73 -0
  113. package/api/kit/fx/Flash.d.ts +22 -0
  114. package/api/kit/fx/Ticker.d.ts +31 -0
  115. package/api/kit/fx/confetti.d.ts +54 -0
  116. package/api/kit/fx/digitSnap.d.ts +20 -0
  117. package/api/kit/fx/director.d.ts +130 -0
  118. package/api/kit/fx/flight.d.ts +75 -0
  119. package/api/kit/fx/gesture.d.ts +66 -0
  120. package/api/kit/fx/index.d.ts +15 -0
  121. package/api/kit/fx/marks.d.ts +78 -0
  122. package/api/kit/fx/motion.d.ts +37 -0
  123. package/api/kit/fx/rarity.d.ts +35 -0
  124. package/api/kit/fx/scheme.d.ts +16 -0
  125. package/api/kit/fx/throttle.d.ts +11 -0
  126. package/api/kit/fx/tokens.d.ts +29 -0
  127. package/api/kit/fx/useShake.d.ts +15 -0
  128. package/api/kit/index.d.ts +2 -0
  129. package/api/kit/reveal/index.d.ts +4 -0
  130. package/api/kit/reveal/ladder.d.ts +16 -0
  131. package/api/kit/reveal/pity.d.ts +38 -0
  132. package/api/kit/reveal/sequence.d.ts +115 -0
  133. package/api/kit/reveal/useRevealSequence.d.ts +90 -0
  134. package/api/kit/theme/build.d.ts +93 -0
  135. package/api/react/away.d.ts +67 -0
  136. package/api/react/boot.d.ts +11 -0
  137. package/api/react/clock.d.ts +25 -0
  138. package/api/react/gameClock.d.ts +15 -0
  139. package/api/react/hashRoute.d.ts +6 -0
  140. package/api/react/hotkeys.d.ts +9 -0
  141. package/api/react/index.d.ts +16 -0
  142. package/api/react/layout.d.ts +32 -0
  143. package/api/react/news.d.ts +6 -0
  144. package/api/react/paced.d.ts +46 -0
  145. package/api/react/prefs.d.ts +4 -0
  146. package/api/react/runtime.d.ts +52 -0
  147. package/api/react/sample.d.ts +67 -0
  148. package/api/react/store.d.ts +68 -0
  149. package/api/react/swap.d.ts +31 -0
  150. package/api/react/tabTitle.d.ts +19 -0
  151. package/api/shader/audio.d.ts +26 -0
  152. package/api/shader/canvas.d.ts +82 -0
  153. package/api/shader/glsl.d.ts +156 -0
  154. package/api/shader/head.d.ts +22 -0
  155. package/api/shader/index.d.ts +11 -0
  156. package/api/shader/pool.d.ts +48 -0
  157. package/api/shader/program.d.ts +33 -0
  158. package/api/shader/pulse.d.ts +22 -0
  159. package/api/shader/scheduler.d.ts +43 -0
  160. package/api/shader/stepped.d.ts +31 -0
  161. package/api/shader/tokens.d.ts +16 -0
  162. package/api/shader/uniforms.d.ts +34 -0
  163. package/api/sim/auto.d.ts +126 -0
  164. package/api/sim/bare.d.ts +29 -0
  165. package/api/sim/contract.d.ts +110 -0
  166. package/api/sim/fit.d.ts +190 -0
  167. package/api/sim/gate.d.ts +30 -0
  168. package/api/sim/index.d.ts +13 -0
  169. package/api/sim/print.d.ts +8 -0
  170. package/api/sim/profile.d.ts +67 -0
  171. package/api/sim/proof.d.ts +54 -0
  172. package/api/sim/schedule.d.ts +94 -0
  173. package/api/sim/snapshot.d.ts +67 -0
  174. package/api/sim/table.d.ts +56 -0
  175. package/api/sim/timeline.d.ts +31 -0
  176. package/api/sim/world.d.ts +87 -0
  177. package/api/sound/babble.d.ts +34 -0
  178. package/api/sound/boot.d.ts +30 -0
  179. package/api/sound/capture.d.ts +22 -0
  180. package/api/sound/core.gen.d.ts +6 -0
  181. package/api/sound/cues.d.ts +44 -0
  182. package/api/sound/desk-fx.d.ts +11 -0
  183. package/api/sound/desk.d.ts +491 -0
  184. package/api/sound/engine.d.ts +27 -0
  185. package/api/sound/fallback.d.ts +19 -0
  186. package/api/sound/gate.d.ts +17 -0
  187. package/api/sound/governor.d.ts +78 -0
  188. package/api/sound/index.d.ts +8 -0
  189. package/api/sound/instruments.d.ts +10 -0
  190. package/api/sound/mixer.d.ts +165 -0
  191. package/api/sound/mod.d.ts +27 -0
  192. package/api/sound/music/arranger.d.ts +6 -0
  193. package/api/sound/music/harmony.d.ts +36 -0
  194. package/api/sound/music/sequence.d.ts +9 -0
  195. package/api/sound/music/transport.d.ts +27 -0
  196. package/api/sound/pack/build.d.ts +25 -0
  197. package/api/sound/pack/edit.d.ts +14 -0
  198. package/api/sound/pack/ffmpeg.d.ts +32 -0
  199. package/api/sound/pack/host.d.ts +37 -0
  200. package/api/sound/pack/index.d.ts +7 -0
  201. package/api/sound/pack/manifest.d.ts +21 -0
  202. package/api/sound/pack/measure.d.ts +22 -0
  203. package/api/sound/pack/pipeline.d.ts +34 -0
  204. package/api/sound/pack/pitch.d.ts +16 -0
  205. package/api/sound/pack/sample.d.ts +120 -0
  206. package/api/sound/pack/source.d.ts +63 -0
  207. package/api/sound/pack/trim.d.ts +15 -0
  208. package/api/sound/port.d.ts +84 -0
  209. package/api/sound/prefs.d.ts +22 -0
  210. package/api/sound/presets.d.ts +30 -0
  211. package/api/sound/protocol.d.ts +841 -0
  212. package/api/sound/samples.d.ts +59 -0
  213. package/api/sound/space.d.ts +23 -0
  214. package/api/sound/tap.d.ts +12 -0
  215. package/api/sound/types.d.ts +783 -0
  216. package/api/sound/voice.d.ts +39 -0
  217. package/api/test/backend.d.ts +13 -0
  218. package/api/test/clock.d.ts +13 -0
  219. package/api/test/decimal-comparisons.d.ts +39 -0
  220. package/api/test/index.d.ts +6 -0
  221. package/api/test/parity.d.ts +29 -0
  222. package/api/test/render.d.ts +8 -0
  223. package/api/test/store.d.ts +47 -0
  224. package/api/three/FpsCounter.d.ts +12 -0
  225. package/api/three/LabelProjector.d.ts +10 -0
  226. package/api/three/Stage.d.ts +143 -0
  227. package/api/three/boot.d.ts +48 -0
  228. package/api/three/cache.d.ts +37 -0
  229. package/api/three/caustics.d.ts +119 -0
  230. package/api/three/clip.d.ts +7 -0
  231. package/api/three/compile.d.ts +16 -0
  232. package/api/three/ease.d.ts +15 -0
  233. package/api/three/eyes.d.ts +20 -0
  234. package/api/three/fps.d.ts +46 -0
  235. package/api/three/glance.d.ts +41 -0
  236. package/api/three/idle.d.ts +36 -0
  237. package/api/three/index.d.ts +29 -0
  238. package/api/three/inspect.d.ts +105 -0
  239. package/api/three/labels.d.ts +30 -0
  240. package/api/three/params.d.ts +18 -0
  241. package/api/three/path.d.ts +18 -0
  242. package/api/three/perf.d.ts +62 -0
  243. package/api/three/pick.d.ts +12 -0
  244. package/api/three/poses.d.ts +108 -0
  245. package/api/three/post.d.ts +108 -0
  246. package/api/three/quality.d.ts +68 -0
  247. package/api/three/rig.d.ts +86 -0
  248. package/api/three/spring.d.ts +45 -0
  249. package/api/three/sprites.d.ts +55 -0
  250. package/api/three/text.d.ts +31 -0
  251. package/api/three/timeline.d.ts +29 -0
  252. package/api/three/tsl.d.ts +100 -0
  253. package/api/three/view.d.ts +34 -0
  254. package/api/ui/clear.d.ts +39 -0
  255. package/api/ui/confirm.d.ts +36 -0
  256. package/api/ui/crash.d.ts +40 -0
  257. package/api/ui/cx.d.ts +2 -0
  258. package/api/ui/dialog.d.ts +120 -0
  259. package/api/ui/feedback.d.ts +99 -0
  260. package/api/ui/focus.d.ts +10 -0
  261. package/api/ui/grid.d.ts +131 -0
  262. package/api/ui/hooks.d.ts +90 -0
  263. package/api/ui/index.d.ts +23 -0
  264. package/api/ui/near.d.ts +73 -0
  265. package/api/ui/page.d.ts +91 -0
  266. package/api/ui/portal.d.ts +14 -0
  267. package/api/ui/position.d.ts +53 -0
  268. package/api/ui/press.d.ts +68 -0
  269. package/api/ui/print.d.ts +159 -0
  270. package/api/ui/simple.d.ts +55 -0
  271. package/api/ui/slot.d.ts +45 -0
  272. package/api/ui/tabs.d.ts +139 -0
  273. package/api/ui/tips.d.ts +52 -0
  274. package/api/ui/tooltip.d.ts +106 -0
  275. package/api/ui/tree.d.ts +79 -0
  276. package/api/ui/values.d.ts +94 -0
  277. package/bin/watchpot.mjs +22 -0
  278. package/codemods/README.md +19 -0
  279. package/dist/cli/doctor.d.ts +17 -0
  280. package/dist/cli/doctor.js +182 -0
  281. package/dist/cli/engine.d.ts +27 -0
  282. package/dist/cli/engine.js +104 -0
  283. package/dist/cli/index.d.ts +13 -0
  284. package/dist/cli/index.js +40 -0
  285. package/dist/cli/skills.d.ts +4 -0
  286. package/dist/cli/skills.js +61 -0
  287. package/dist/core/achievements.d.ts +172 -0
  288. package/dist/core/achievements.js +159 -0
  289. package/dist/core/allocation.d.ts +138 -0
  290. package/dist/core/allocation.js +221 -0
  291. package/dist/core/annotate.d.ts +44 -0
  292. package/dist/core/annotate.js +117 -0
  293. package/dist/core/autobuyers.d.ts +91 -0
  294. package/dist/core/autobuyers.js +116 -0
  295. package/dist/core/board.d.ts +190 -0
  296. package/dist/core/board.js +372 -0
  297. package/dist/core/buffs.d.ts +139 -0
  298. package/dist/core/buffs.js +184 -0
  299. package/dist/core/cells.d.ts +58 -0
  300. package/dist/core/cells.js +0 -0
  301. package/dist/core/challenges.d.ts +101 -0
  302. package/dist/core/challenges.js +123 -0
  303. package/dist/core/clicker.d.ts +128 -0
  304. package/dist/core/clicker.js +130 -0
  305. package/dist/core/clock-feature.d.ts +72 -0
  306. package/dist/core/clock-feature.js +139 -0
  307. package/dist/core/clock.d.ts +85 -0
  308. package/dist/core/clock.js +143 -0
  309. package/dist/core/cost.d.ts +56 -0
  310. package/dist/core/cost.js +176 -0
  311. package/dist/core/currencies.d.ts +137 -0
  312. package/dist/core/currencies.js +160 -0
  313. package/dist/core/decimal.d.ts +25 -0
  314. package/dist/core/decimal.js +40 -0
  315. package/dist/core/derived.d.ts +16 -0
  316. package/dist/core/derived.js +13 -0
  317. package/dist/core/dimensions.d.ts +159 -0
  318. package/dist/core/dimensions.js +238 -0
  319. package/dist/core/events/boards.d.ts +51 -0
  320. package/dist/core/events/boards.js +58 -0
  321. package/dist/core/events/definition.d.ts +207 -0
  322. package/dist/core/events/definition.js +0 -0
  323. package/dist/core/events/index.d.ts +5 -0
  324. package/dist/core/events/index.js +5 -0
  325. package/dist/core/events/regen.d.ts +24 -0
  326. package/dist/core/events/regen.js +67 -0
  327. package/dist/core/events/runtime.d.ts +73 -0
  328. package/dist/core/events/runtime.js +233 -0
  329. package/dist/core/events/schedule.d.ts +33 -0
  330. package/dist/core/events/schedule.js +24 -0
  331. package/dist/core/feature-types.d.ts +228 -0
  332. package/dist/core/feature-types.js +0 -0
  333. package/dist/core/feature.d.ts +53 -0
  334. package/dist/core/feature.js +65 -0
  335. package/dist/core/fill.d.ts +8 -0
  336. package/dist/core/fill.js +24 -0
  337. package/dist/core/fmt.d.ts +117 -0
  338. package/dist/core/fmt.js +257 -0
  339. package/dist/core/gacha/feature.d.ts +106 -0
  340. package/dist/core/gacha/feature.js +86 -0
  341. package/dist/core/gacha/kernel.d.ts +50 -0
  342. package/dist/core/gacha/kernel.js +82 -0
  343. package/dist/core/game.d.ts +62 -0
  344. package/dist/core/game.js +114 -0
  345. package/dist/core/gauge.d.ts +121 -0
  346. package/dist/core/gauge.js +125 -0
  347. package/dist/core/generators.d.ts +217 -0
  348. package/dist/core/generators.js +325 -0
  349. package/dist/core/graph/nodes.d.ts +67 -0
  350. package/dist/core/graph/nodes.js +35 -0
  351. package/dist/core/graph/stats.d.ts +138 -0
  352. package/dist/core/graph/stats.js +159 -0
  353. package/dist/core/graph/yields.d.ts +17 -0
  354. package/dist/core/graph/yields.js +14 -0
  355. package/dist/core/index.d.ts +56 -0
  356. package/dist/core/index.js +56 -0
  357. package/dist/core/journal.d.ts +14 -0
  358. package/dist/core/journal.js +18 -0
  359. package/dist/core/layers/check.d.ts +8 -0
  360. package/dist/core/layers/check.js +108 -0
  361. package/dist/core/layers/feature.d.ts +63 -0
  362. package/dist/core/layers/feature.js +111 -0
  363. package/dist/core/layers/helpers.d.ts +12 -0
  364. package/dist/core/layers/helpers.js +11 -0
  365. package/dist/core/layers/index.d.ts +6 -0
  366. package/dist/core/layers/index.js +6 -0
  367. package/dist/core/layers/query.d.ts +113 -0
  368. package/dist/core/layers/query.js +381 -0
  369. package/dist/core/layers/rules.d.ts +61 -0
  370. package/dist/core/layers/rules.js +293 -0
  371. package/dist/core/layers/types.d.ts +289 -0
  372. package/dist/core/layers/types.js +3 -0
  373. package/dist/core/levels.d.ts +125 -0
  374. package/dist/core/levels.js +194 -0
  375. package/dist/core/loadout.d.ts +156 -0
  376. package/dist/core/loadout.js +260 -0
  377. package/dist/core/market.d.ts +188 -0
  378. package/dist/core/market.js +328 -0
  379. package/dist/core/missions.d.ts +109 -0
  380. package/dist/core/missions.js +139 -0
  381. package/dist/core/pace.d.ts +32 -0
  382. package/dist/core/pace.js +65 -0
  383. package/dist/core/persist.d.ts +89 -0
  384. package/dist/core/persist.js +166 -0
  385. package/dist/core/plain.d.ts +52 -0
  386. package/dist/core/plain.js +164 -0
  387. package/dist/core/prefs.d.ts +48 -0
  388. package/dist/core/prefs.js +68 -0
  389. package/dist/core/prestige/prestige.d.ts +244 -0
  390. package/dist/core/prestige/prestige.js +196 -0
  391. package/dist/core/recipes.d.ts +140 -0
  392. package/dist/core/recipes.js +244 -0
  393. package/dist/core/records.d.ts +104 -0
  394. package/dist/core/records.js +108 -0
  395. package/dist/core/reset-rule.d.ts +33 -0
  396. package/dist/core/reset-rule.js +22 -0
  397. package/dist/core/rng.d.ts +15 -0
  398. package/dist/core/rng.js +71 -0
  399. package/dist/core/save.d.ts +70 -0
  400. package/dist/core/save.js +194 -0
  401. package/dist/core/seen.d.ts +32 -0
  402. package/dist/core/seen.js +44 -0
  403. package/dist/core/settings.d.ts +20 -0
  404. package/dist/core/settings.js +20 -0
  405. package/dist/core/spawns.d.ts +153 -0
  406. package/dist/core/spawns.js +208 -0
  407. package/dist/core/stages.d.ts +126 -0
  408. package/dist/core/stages.js +165 -0
  409. package/dist/core/stats.d.ts +105 -0
  410. package/dist/core/stats.js +144 -0
  411. package/dist/core/steps.d.ts +81 -0
  412. package/dist/core/steps.js +4 -0
  413. package/dist/core/storage.d.ts +94 -0
  414. package/dist/core/storage.js +272 -0
  415. package/dist/core/store.d.ts +84 -0
  416. package/dist/core/store.js +372 -0
  417. package/dist/core/streak.d.ts +111 -0
  418. package/dist/core/streak.js +89 -0
  419. package/dist/core/sweep.d.ts +128 -0
  420. package/dist/core/sweep.js +155 -0
  421. package/dist/core/tick.d.ts +38 -0
  422. package/dist/core/tick.js +100 -0
  423. package/dist/core/time.d.ts +19 -0
  424. package/dist/core/time.js +34 -0
  425. package/dist/core/tree.d.ts +205 -0
  426. package/dist/core/tree.js +276 -0
  427. package/dist/core/vocab.d.ts +94 -0
  428. package/dist/core/vocab.js +58 -0
  429. package/dist/core/watch.d.ts +80 -0
  430. package/dist/core/watch.js +110 -0
  431. package/dist/core/world.d.ts +13 -0
  432. package/dist/core/world.js +0 -0
  433. package/dist/devtools/DevPanel.d.ts +12 -0
  434. package/dist/devtools/DevPanel.js +110 -0
  435. package/dist/devtools/DevPanel.module.css +196 -0
  436. package/dist/devtools/SoundDesk.d.ts +48 -0
  437. package/dist/devtools/SoundDesk.js +192 -0
  438. package/dist/devtools/SoundDesk.module.css +1927 -0
  439. package/dist/devtools/desk/Arrangement.d.ts +1 -0
  440. package/dist/devtools/desk/Arrangement.js +92 -0
  441. package/dist/devtools/desk/Devices.d.ts +7 -0
  442. package/dist/devtools/desk/Devices.js +130 -0
  443. package/dist/devtools/desk/SoundDeskView.d.ts +17 -0
  444. package/dist/devtools/desk/SoundDeskView.js +292 -0
  445. package/dist/devtools/desk/SourceDetail.d.ts +4 -0
  446. package/dist/devtools/desk/SourceDetail.js +324 -0
  447. package/dist/devtools/desk/Sources.d.ts +19 -0
  448. package/dist/devtools/desk/Sources.js +110 -0
  449. package/dist/devtools/desk/Tracks.d.ts +23 -0
  450. package/dist/devtools/desk/Tracks.js +123 -0
  451. package/dist/devtools/desk/Tunables.d.ts +10 -0
  452. package/dist/devtools/desk/Tunables.js +46 -0
  453. package/dist/devtools/desk/Waveform.d.ts +16 -0
  454. package/dist/devtools/desk/Waveform.js +96 -0
  455. package/dist/devtools/desk/context.d.ts +47 -0
  456. package/dist/devtools/desk/context.js +20 -0
  457. package/dist/devtools/desk/controls.d.ts +172 -0
  458. package/dist/devtools/desk/controls.js +373 -0
  459. package/dist/devtools/desk/layered.d.ts +86 -0
  460. package/dist/devtools/desk/layered.js +132 -0
  461. package/dist/devtools/desk/loop.d.ts +51 -0
  462. package/dist/devtools/desk/loop.js +150 -0
  463. package/dist/devtools/desk/model.d.ts +117 -0
  464. package/dist/devtools/desk/model.js +231 -0
  465. package/dist/devtools/desk/prefs.d.ts +32 -0
  466. package/dist/devtools/desk/prefs.js +47 -0
  467. package/dist/devtools/desk/samples.d.ts +70 -0
  468. package/dist/devtools/desk/samples.js +230 -0
  469. package/dist/devtools/desk/scale.d.ts +40 -0
  470. package/dist/devtools/desk/scale.js +171 -0
  471. package/dist/devtools/devTools.d.ts +24 -0
  472. package/dist/devtools/devTools.js +54 -0
  473. package/dist/devtools/gate.d.ts +8 -0
  474. package/dist/devtools/gate.js +21 -0
  475. package/dist/devtools/index.d.ts +3 -0
  476. package/dist/devtools/index.js +8 -0
  477. package/dist/devtools/sampleHost.d.ts +10 -0
  478. package/dist/devtools/sampleHost.js +68 -0
  479. package/dist/kit/fx/Count.d.ts +73 -0
  480. package/dist/kit/fx/Count.js +137 -0
  481. package/dist/kit/fx/Flash.d.ts +22 -0
  482. package/dist/kit/fx/Flash.js +50 -0
  483. package/dist/kit/fx/Ticker.d.ts +31 -0
  484. package/dist/kit/fx/Ticker.js +72 -0
  485. package/dist/kit/fx/confetti.d.ts +54 -0
  486. package/dist/kit/fx/confetti.js +197 -0
  487. package/dist/kit/fx/digitSnap.d.ts +20 -0
  488. package/dist/kit/fx/digitSnap.js +43 -0
  489. package/dist/kit/fx/director.d.ts +130 -0
  490. package/dist/kit/fx/director.js +284 -0
  491. package/dist/kit/fx/flight.d.ts +75 -0
  492. package/dist/kit/fx/flight.js +212 -0
  493. package/dist/kit/fx/gesture.d.ts +66 -0
  494. package/dist/kit/fx/gesture.js +107 -0
  495. package/dist/kit/fx/index.d.ts +15 -0
  496. package/dist/kit/fx/index.js +15 -0
  497. package/dist/kit/fx/marks.d.ts +78 -0
  498. package/dist/kit/fx/marks.js +170 -0
  499. package/dist/kit/fx/motion.d.ts +37 -0
  500. package/dist/kit/fx/motion.js +72 -0
  501. package/dist/kit/fx/rarity.d.ts +35 -0
  502. package/dist/kit/fx/rarity.js +41 -0
  503. package/dist/kit/fx/scheme.d.ts +16 -0
  504. package/dist/kit/fx/scheme.js +36 -0
  505. package/dist/kit/fx/throttle.d.ts +11 -0
  506. package/dist/kit/fx/throttle.js +41 -0
  507. package/dist/kit/fx/tokens.d.ts +29 -0
  508. package/dist/kit/fx/tokens.js +119 -0
  509. package/dist/kit/fx/useShake.d.ts +15 -0
  510. package/dist/kit/fx/useShake.js +33 -0
  511. package/dist/kit/index.d.ts +2 -0
  512. package/dist/kit/index.js +5 -0
  513. package/dist/kit/reveal/index.d.ts +4 -0
  514. package/dist/kit/reveal/index.js +6 -0
  515. package/dist/kit/reveal/ladder.d.ts +16 -0
  516. package/dist/kit/reveal/ladder.js +29 -0
  517. package/dist/kit/reveal/pity.d.ts +38 -0
  518. package/dist/kit/reveal/pity.js +31 -0
  519. package/dist/kit/reveal/sequence.d.ts +115 -0
  520. package/dist/kit/reveal/sequence.js +177 -0
  521. package/dist/kit/reveal/useRevealSequence.d.ts +90 -0
  522. package/dist/kit/reveal/useRevealSequence.js +135 -0
  523. package/dist/react/away.d.ts +67 -0
  524. package/dist/react/away.js +102 -0
  525. package/dist/react/boot.d.ts +11 -0
  526. package/dist/react/boot.js +12 -0
  527. package/dist/react/clock.d.ts +25 -0
  528. package/dist/react/clock.js +98 -0
  529. package/dist/react/gameClock.d.ts +15 -0
  530. package/dist/react/gameClock.js +31 -0
  531. package/dist/react/hashRoute.d.ts +6 -0
  532. package/dist/react/hashRoute.js +20 -0
  533. package/dist/react/hotkeys.d.ts +9 -0
  534. package/dist/react/hotkeys.js +30 -0
  535. package/dist/react/index.d.ts +16 -0
  536. package/dist/react/index.js +18 -0
  537. package/dist/react/layout.d.ts +32 -0
  538. package/dist/react/layout.js +40 -0
  539. package/dist/react/news.d.ts +6 -0
  540. package/dist/react/news.js +18 -0
  541. package/dist/react/paced.d.ts +46 -0
  542. package/dist/react/paced.js +139 -0
  543. package/dist/react/prefs.d.ts +4 -0
  544. package/dist/react/prefs.js +5 -0
  545. package/dist/react/runtime.d.ts +52 -0
  546. package/dist/react/runtime.js +55 -0
  547. package/dist/react/sample.d.ts +67 -0
  548. package/dist/react/sample.js +97 -0
  549. package/dist/react/store.d.ts +68 -0
  550. package/dist/react/store.js +86 -0
  551. package/dist/react/swap.d.ts +31 -0
  552. package/dist/react/swap.js +26 -0
  553. package/dist/react/tabTitle.d.ts +19 -0
  554. package/dist/react/tabTitle.js +69 -0
  555. package/dist/shader/audio.d.ts +26 -0
  556. package/dist/shader/audio.js +61 -0
  557. package/dist/shader/canvas.d.ts +82 -0
  558. package/dist/shader/canvas.js +277 -0
  559. package/dist/shader/glsl.d.ts +156 -0
  560. package/dist/shader/glsl.js +489 -0
  561. package/dist/shader/head.d.ts +22 -0
  562. package/dist/shader/head.js +45 -0
  563. package/dist/shader/index.d.ts +11 -0
  564. package/dist/shader/index.js +13 -0
  565. package/dist/shader/pool.d.ts +48 -0
  566. package/dist/shader/pool.js +168 -0
  567. package/dist/shader/program.d.ts +33 -0
  568. package/dist/shader/program.js +104 -0
  569. package/dist/shader/pulse.d.ts +22 -0
  570. package/dist/shader/pulse.js +44 -0
  571. package/dist/shader/scheduler.d.ts +43 -0
  572. package/dist/shader/scheduler.js +164 -0
  573. package/dist/shader/stepped.d.ts +31 -0
  574. package/dist/shader/stepped.js +57 -0
  575. package/dist/shader/tokens.d.ts +16 -0
  576. package/dist/shader/tokens.js +128 -0
  577. package/dist/shader/uniforms.d.ts +34 -0
  578. package/dist/shader/uniforms.js +130 -0
  579. package/dist/sim/auto.d.ts +126 -0
  580. package/dist/sim/auto.js +173 -0
  581. package/dist/sim/bare.d.ts +29 -0
  582. package/dist/sim/bare.js +32 -0
  583. package/dist/sim/contract.d.ts +110 -0
  584. package/dist/sim/contract.js +121 -0
  585. package/dist/sim/fit.d.ts +190 -0
  586. package/dist/sim/fit.js +256 -0
  587. package/dist/sim/gate.d.ts +30 -0
  588. package/dist/sim/gate.js +40 -0
  589. package/dist/sim/index.d.ts +13 -0
  590. package/dist/sim/index.js +13 -0
  591. package/dist/sim/print.d.ts +8 -0
  592. package/dist/sim/print.js +29 -0
  593. package/dist/sim/profile.d.ts +67 -0
  594. package/dist/sim/profile.js +108 -0
  595. package/dist/sim/proof-worker.d.ts +5 -0
  596. package/dist/sim/proof-worker.js +46 -0
  597. package/dist/sim/proof.d.ts +54 -0
  598. package/dist/sim/proof.js +58 -0
  599. package/dist/sim/schedule.d.ts +94 -0
  600. package/dist/sim/schedule.js +97 -0
  601. package/dist/sim/snapshot.d.ts +67 -0
  602. package/dist/sim/snapshot.js +139 -0
  603. package/dist/sim/table.d.ts +56 -0
  604. package/dist/sim/table.js +78 -0
  605. package/dist/sim/timeline.d.ts +31 -0
  606. package/dist/sim/timeline.js +36 -0
  607. package/dist/sim/world.d.ts +87 -0
  608. package/dist/sim/world.js +81 -0
  609. package/dist/sound/babble.d.ts +34 -0
  610. package/dist/sound/babble.js +392 -0
  611. package/dist/sound/boot.d.ts +30 -0
  612. package/dist/sound/boot.js +95 -0
  613. package/dist/sound/capture.d.ts +22 -0
  614. package/dist/sound/capture.js +100 -0
  615. package/dist/sound/core.gen.d.ts +6 -0
  616. package/dist/sound/core.gen.js +7 -0
  617. package/dist/sound/cues.d.ts +44 -0
  618. package/dist/sound/cues.js +120 -0
  619. package/dist/sound/desk-fx.d.ts +11 -0
  620. package/dist/sound/desk-fx.js +114 -0
  621. package/dist/sound/desk.d.ts +491 -0
  622. package/dist/sound/desk.js +1196 -0
  623. package/dist/sound/engine.d.ts +27 -0
  624. package/dist/sound/engine.js +911 -0
  625. package/dist/sound/fallback.d.ts +19 -0
  626. package/dist/sound/fallback.js +23 -0
  627. package/dist/sound/gate.d.ts +17 -0
  628. package/dist/sound/gate.js +49 -0
  629. package/dist/sound/governor.d.ts +78 -0
  630. package/dist/sound/governor.js +201 -0
  631. package/dist/sound/index.d.ts +8 -0
  632. package/dist/sound/index.js +9 -0
  633. package/dist/sound/instruments.d.ts +10 -0
  634. package/dist/sound/instruments.js +239 -0
  635. package/dist/sound/mixer.d.ts +165 -0
  636. package/dist/sound/mixer.js +1201 -0
  637. package/dist/sound/mod.d.ts +27 -0
  638. package/dist/sound/mod.js +81 -0
  639. package/dist/sound/music/arranger.d.ts +6 -0
  640. package/dist/sound/music/arranger.js +446 -0
  641. package/dist/sound/music/harmony.d.ts +36 -0
  642. package/dist/sound/music/harmony.js +122 -0
  643. package/dist/sound/music/sequence.d.ts +9 -0
  644. package/dist/sound/music/sequence.js +185 -0
  645. package/dist/sound/music/transport.d.ts +27 -0
  646. package/dist/sound/music/transport.js +88 -0
  647. package/dist/sound/port.d.ts +84 -0
  648. package/dist/sound/port.js +0 -0
  649. package/dist/sound/prefs.d.ts +22 -0
  650. package/dist/sound/prefs.js +62 -0
  651. package/dist/sound/presets.d.ts +30 -0
  652. package/dist/sound/presets.js +187 -0
  653. package/dist/sound/protocol.d.ts +841 -0
  654. package/dist/sound/protocol.js +549 -0
  655. package/dist/sound/samples.d.ts +59 -0
  656. package/dist/sound/samples.js +113 -0
  657. package/dist/sound/space.d.ts +23 -0
  658. package/dist/sound/space.js +75 -0
  659. package/dist/sound/tap.d.ts +12 -0
  660. package/dist/sound/tap.js +58 -0
  661. package/dist/sound/types.d.ts +783 -0
  662. package/dist/sound/types.js +0 -0
  663. package/dist/sound/voice.d.ts +39 -0
  664. package/dist/sound/voice.js +50 -0
  665. package/dist/test/backend.d.ts +13 -0
  666. package/dist/test/backend.js +33 -0
  667. package/dist/test/clock.d.ts +13 -0
  668. package/dist/test/clock.js +18 -0
  669. package/dist/test/decimal-comparisons.d.ts +39 -0
  670. package/dist/test/decimal-comparisons.js +123 -0
  671. package/dist/test/index.d.ts +6 -0
  672. package/dist/test/index.js +6 -0
  673. package/dist/test/parity.d.ts +29 -0
  674. package/dist/test/parity.js +58 -0
  675. package/dist/test/render.d.ts +8 -0
  676. package/dist/test/render.js +11 -0
  677. package/dist/test/store.d.ts +47 -0
  678. package/dist/test/store.js +37 -0
  679. package/dist/three/FpsCounter.d.ts +12 -0
  680. package/dist/three/FpsCounter.js +10 -0
  681. package/dist/three/LabelProjector.d.ts +10 -0
  682. package/dist/three/LabelProjector.js +12 -0
  683. package/dist/three/Stage.d.ts +143 -0
  684. package/dist/three/Stage.js +405 -0
  685. package/dist/three/boot.d.ts +48 -0
  686. package/dist/three/boot.js +132 -0
  687. package/dist/three/cache.d.ts +37 -0
  688. package/dist/three/cache.js +101 -0
  689. package/dist/three/caustics.d.ts +119 -0
  690. package/dist/three/caustics.js +630 -0
  691. package/dist/three/clip.d.ts +7 -0
  692. package/dist/three/clip.js +159 -0
  693. package/dist/three/compile.d.ts +16 -0
  694. package/dist/three/compile.js +30 -0
  695. package/dist/three/ease.d.ts +15 -0
  696. package/dist/three/ease.js +22 -0
  697. package/dist/three/eyes.d.ts +20 -0
  698. package/dist/three/eyes.js +20 -0
  699. package/dist/three/fps.d.ts +46 -0
  700. package/dist/three/fps.js +100 -0
  701. package/dist/three/glance.d.ts +41 -0
  702. package/dist/three/glance.js +73 -0
  703. package/dist/three/idle.d.ts +36 -0
  704. package/dist/three/idle.js +104 -0
  705. package/dist/three/index.d.ts +29 -0
  706. package/dist/three/index.js +31 -0
  707. package/dist/three/inspect.d.ts +105 -0
  708. package/dist/three/inspect.js +242 -0
  709. package/dist/three/labels.d.ts +30 -0
  710. package/dist/three/labels.js +52 -0
  711. package/dist/three/params.d.ts +18 -0
  712. package/dist/three/params.js +11 -0
  713. package/dist/three/path.d.ts +18 -0
  714. package/dist/three/path.js +63 -0
  715. package/dist/three/perf.d.ts +62 -0
  716. package/dist/three/perf.js +85 -0
  717. package/dist/three/pick.d.ts +12 -0
  718. package/dist/three/pick.js +29 -0
  719. package/dist/three/poses.d.ts +108 -0
  720. package/dist/three/poses.js +161 -0
  721. package/dist/three/post.d.ts +108 -0
  722. package/dist/three/post.js +300 -0
  723. package/dist/three/quality.d.ts +68 -0
  724. package/dist/three/quality.js +96 -0
  725. package/dist/three/rig.d.ts +86 -0
  726. package/dist/three/rig.js +193 -0
  727. package/dist/three/spring.d.ts +45 -0
  728. package/dist/three/spring.js +55 -0
  729. package/dist/three/sprites.d.ts +55 -0
  730. package/dist/three/sprites.js +92 -0
  731. package/dist/three/text.d.ts +31 -0
  732. package/dist/three/text.js +49 -0
  733. package/dist/three/timeline.d.ts +29 -0
  734. package/dist/three/timeline.js +43 -0
  735. package/dist/three/tsl.d.ts +100 -0
  736. package/dist/three/tsl.js +163 -0
  737. package/dist/three/view.d.ts +34 -0
  738. package/dist/three/view.js +36 -0
  739. package/dist/ui/clear.d.ts +39 -0
  740. package/dist/ui/clear.js +66 -0
  741. package/dist/ui/confirm.d.ts +36 -0
  742. package/dist/ui/confirm.js +73 -0
  743. package/dist/ui/crash.d.ts +40 -0
  744. package/dist/ui/crash.js +24 -0
  745. package/dist/ui/cx.d.ts +2 -0
  746. package/dist/ui/cx.js +4 -0
  747. package/dist/ui/dialog.d.ts +120 -0
  748. package/dist/ui/dialog.js +129 -0
  749. package/dist/ui/feedback.d.ts +99 -0
  750. package/dist/ui/feedback.js +197 -0
  751. package/dist/ui/focus.d.ts +10 -0
  752. package/dist/ui/focus.js +43 -0
  753. package/dist/ui/grid.d.ts +131 -0
  754. package/dist/ui/grid.js +214 -0
  755. package/dist/ui/hooks.d.ts +90 -0
  756. package/dist/ui/hooks.js +282 -0
  757. package/dist/ui/index.d.ts +23 -0
  758. package/dist/ui/index.js +25 -0
  759. package/dist/ui/near.d.ts +73 -0
  760. package/dist/ui/near.js +106 -0
  761. package/dist/ui/page.d.ts +91 -0
  762. package/dist/ui/page.js +63 -0
  763. package/dist/ui/portal.d.ts +14 -0
  764. package/dist/ui/portal.js +22 -0
  765. package/dist/ui/position.d.ts +53 -0
  766. package/dist/ui/position.js +95 -0
  767. package/dist/ui/press.d.ts +68 -0
  768. package/dist/ui/press.js +181 -0
  769. package/dist/ui/print.d.ts +159 -0
  770. package/dist/ui/print.js +191 -0
  771. package/dist/ui/simple.d.ts +55 -0
  772. package/dist/ui/simple.js +78 -0
  773. package/dist/ui/slot.d.ts +45 -0
  774. package/dist/ui/slot.js +105 -0
  775. package/dist/ui/tabs.d.ts +139 -0
  776. package/dist/ui/tabs.js +180 -0
  777. package/dist/ui/tips.d.ts +52 -0
  778. package/dist/ui/tips.js +324 -0
  779. package/dist/ui/tooltip.d.ts +106 -0
  780. package/dist/ui/tooltip.js +249 -0
  781. package/dist/ui/tree.d.ts +79 -0
  782. package/dist/ui/tree.js +106 -0
  783. package/dist/ui/values.d.ts +94 -0
  784. package/dist/ui/values.js +122 -0
  785. package/docs/README.md +176 -0
  786. package/docs/achievements.md +123 -0
  787. package/docs/add-a-currency.md +23 -0
  788. package/docs/add-a-generator.md +17 -0
  789. package/docs/allocation.md +73 -0
  790. package/docs/autobuyers.md +71 -0
  791. package/docs/board.md +38 -0
  792. package/docs/buffs.md +110 -0
  793. package/docs/challenges.md +92 -0
  794. package/docs/clicker.md +83 -0
  795. package/docs/core.md +392 -0
  796. package/docs/dev-panel-workflow.md +19 -0
  797. package/docs/devtools.md +31 -0
  798. package/docs/dimensions.md +110 -0
  799. package/docs/events.md +262 -0
  800. package/docs/examples/achievements.ts +73 -0
  801. package/docs/examples/add-a-currency.ts +54 -0
  802. package/docs/examples/add-a-generator.ts +88 -0
  803. package/docs/examples/allocation.ts +39 -0
  804. package/docs/examples/autobuyers.ts +42 -0
  805. package/docs/examples/board.ts +71 -0
  806. package/docs/examples/buffs.ts +61 -0
  807. package/docs/examples/challenges.ts +60 -0
  808. package/docs/examples/clicker.ts +44 -0
  809. package/docs/examples/dev-panel.tsx +40 -0
  810. package/docs/examples/dimensions.ts +55 -0
  811. package/docs/examples/events.ts +236 -0
  812. package/docs/examples/fit-kit.ts +253 -0
  813. package/docs/examples/gacha.ts +62 -0
  814. package/docs/examples/gauge.ts +155 -0
  815. package/docs/examples/generators.ts +74 -0
  816. package/docs/examples/guide-effects.ts +166 -0
  817. package/docs/examples/guide-first-game.tsx +228 -0
  818. package/docs/examples/guide-first-page.ts +292 -0
  819. package/docs/examples/guide-first-reset.ts +162 -0
  820. package/docs/examples/guide-look-and-sound.tsx +206 -0
  821. package/docs/examples/guide-mental-model.ts +146 -0
  822. package/docs/examples/guide-pacing-tree.ts +73 -0
  823. package/docs/examples/guide-pacing.ts +182 -0
  824. package/docs/examples/guide-saving.ts +180 -0
  825. package/docs/examples/guide-template.tsx +12 -0
  826. package/docs/examples/guide-the-page.tsx +145 -0
  827. package/docs/examples/guide-words-and-numbers.ts +128 -0
  828. package/docs/examples/layers.ts +108 -0
  829. package/docs/examples/levels.ts +30 -0
  830. package/docs/examples/loadouts.ts +102 -0
  831. package/docs/examples/market.ts +29 -0
  832. package/docs/examples/migration.ts +96 -0
  833. package/docs/examples/missions.ts +48 -0
  834. package/docs/examples/notations.ts +18 -0
  835. package/docs/examples/pacing-contract.ts +102 -0
  836. package/docs/examples/persona.ts +60 -0
  837. package/docs/examples/plan-and-fit.ts +176 -0
  838. package/docs/examples/prefs.ts +89 -0
  839. package/docs/examples/prestige-layer.ts +57 -0
  840. package/docs/examples/react-runtime.tsx +172 -0
  841. package/docs/examples/readme-smallest.ts +35 -0
  842. package/docs/examples/recipes.ts +37 -0
  843. package/docs/examples/records.ts +37 -0
  844. package/docs/examples/reveal.tsx +62 -0
  845. package/docs/examples/sample-host.ts +22 -0
  846. package/docs/examples/settings.ts +74 -0
  847. package/docs/examples/shader.tsx +198 -0
  848. package/docs/examples/showcase-autoreset.ts +52 -0
  849. package/docs/examples/showcase-glossary.ts +40 -0
  850. package/docs/examples/showcase-glow.tsx +61 -0
  851. package/docs/examples/showcase-latch.ts +64 -0
  852. package/docs/examples/showcase-mute.ts +57 -0
  853. package/docs/examples/showcase-on-display.ts +45 -0
  854. package/docs/examples/showcase-reprice.ts +40 -0
  855. package/docs/examples/simmer/game-wallet.ts +206 -0
  856. package/docs/examples/simmer/game.ts +80 -0
  857. package/docs/examples/simmer/index.html +12 -0
  858. package/docs/examples/simmer/main.tsx +82 -0
  859. package/docs/examples/sound-dsp.ts +123 -0
  860. package/docs/examples/sound-mix.ts +93 -0
  861. package/docs/examples/sound-music.ts +89 -0
  862. package/docs/examples/sound-pack.ts +14 -0
  863. package/docs/examples/sound-table.ts +84 -0
  864. package/docs/examples/spawns.ts +36 -0
  865. package/docs/examples/stages.ts +28 -0
  866. package/docs/examples/start-a-game.ts +50 -0
  867. package/docs/examples/stat-graph.ts +99 -0
  868. package/docs/examples/streak.ts +39 -0
  869. package/docs/examples/sweep.ts +41 -0
  870. package/docs/examples/test-kit.ts +130 -0
  871. package/docs/examples/theme.ts +39 -0
  872. package/docs/examples/three-stage.tsx +124 -0
  873. package/docs/examples/time-away.ts +91 -0
  874. package/docs/examples/timed-event.ts +89 -0
  875. package/docs/examples/ui.tsx +259 -0
  876. package/docs/examples/upgrade-tree.ts +99 -0
  877. package/docs/examples/vocab.ts +11 -0
  878. package/docs/feel.md +182 -0
  879. package/docs/fit-kit.md +201 -0
  880. package/docs/gacha.md +19 -0
  881. package/docs/gauge.md +232 -0
  882. package/docs/generators.md +110 -0
  883. package/docs/glossary.md +703 -0
  884. package/docs/guide/01-what-watchpot-is.md +211 -0
  885. package/docs/guide/02-your-first-game.md +837 -0
  886. package/docs/guide/03-the-mental-model.md +791 -0
  887. package/docs/guide/04-words-and-numbers.md +666 -0
  888. package/docs/guide/05-a-real-game.md +558 -0
  889. package/docs/guide/06-the-first-page.md +777 -0
  890. package/docs/guide/07-the-first-reset.md +628 -0
  891. package/docs/guide/08-effects.md +503 -0
  892. package/docs/guide/09-saving-and-time-away.md +694 -0
  893. package/docs/guide/10-the-page.md +643 -0
  894. package/docs/guide/11-look-and-sound.md +660 -0
  895. package/docs/guide/12-proving-the-pacing.md +584 -0
  896. package/docs/guide/13-from-the-template.md +446 -0
  897. package/docs/how-the-page-boots.md +69 -0
  898. package/docs/imports.md +26 -0
  899. package/docs/installing.md +84 -0
  900. package/docs/kit.md +106 -0
  901. package/docs/layers.md +172 -0
  902. package/docs/levels.md +58 -0
  903. package/docs/loadouts.md +195 -0
  904. package/docs/market.md +75 -0
  905. package/docs/migrating-to-1.0.md +465 -0
  906. package/docs/migration.md +47 -0
  907. package/docs/missions.md +76 -0
  908. package/docs/notations.md +45 -0
  909. package/docs/pacing-contract.md +20 -0
  910. package/docs/persona.md +36 -0
  911. package/docs/plan-and-fit.md +92 -0
  912. package/docs/prefs.md +170 -0
  913. package/docs/prestige-layer.md +42 -0
  914. package/docs/react-runtime.md +235 -0
  915. package/docs/react.md +74 -0
  916. package/docs/recipes.md +76 -0
  917. package/docs/records.md +36 -0
  918. package/docs/reveal.md +25 -0
  919. package/docs/settings.md +102 -0
  920. package/docs/shader.md +112 -0
  921. package/docs/showcases.md +515 -0
  922. package/docs/sim.md +124 -0
  923. package/docs/sound-dsp.md +131 -0
  924. package/docs/sound-mix.md +242 -0
  925. package/docs/sound-music.md +114 -0
  926. package/docs/sound-packs.md +129 -0
  927. package/docs/sound-table.md +125 -0
  928. package/docs/sound.md +91 -0
  929. package/docs/spawns.md +67 -0
  930. package/docs/stages.md +26 -0
  931. package/docs/start-a-game.md +28 -0
  932. package/docs/stat-graph.md +119 -0
  933. package/docs/streak.md +45 -0
  934. package/docs/sweep.md +26 -0
  935. package/docs/test-kit.md +167 -0
  936. package/docs/theme.md +15 -0
  937. package/docs/three.md +185 -0
  938. package/docs/time-away.md +56 -0
  939. package/docs/timed-event.md +15 -0
  940. package/docs/ui.md +273 -0
  941. package/docs/upgrade-tree.md +68 -0
  942. package/env.d.ts +17 -0
  943. package/package.json +152 -4
  944. package/src/cli/doctor.ts +205 -0
  945. package/src/cli/engine.ts +111 -0
  946. package/src/cli/index.ts +53 -0
  947. package/src/cli/skills.ts +62 -0
  948. package/src/core/achievements.ts +345 -0
  949. package/src/core/allocation.ts +362 -0
  950. package/src/core/annotate.ts +137 -0
  951. package/src/core/autobuyers.ts +201 -0
  952. package/src/core/board.ts +525 -0
  953. package/src/core/buffs.ts +315 -0
  954. package/src/core/cells.ts +0 -0
  955. package/src/core/challenges.ts +230 -0
  956. package/src/core/clicker.ts +288 -0
  957. package/src/core/clock-feature.ts +189 -0
  958. package/src/core/clock.ts +203 -0
  959. package/src/core/cost.ts +204 -0
  960. package/src/core/currencies.ts +339 -0
  961. package/src/core/decimal.ts +50 -0
  962. package/src/core/derived.ts +31 -0
  963. package/src/core/dimensions.ts +435 -0
  964. package/src/core/events/boards.ts +106 -0
  965. package/src/core/events/definition.ts +224 -0
  966. package/src/core/events/index.ts +5 -0
  967. package/src/core/events/regen.ts +85 -0
  968. package/src/core/events/runtime.ts +340 -0
  969. package/src/core/events/schedule.ts +41 -0
  970. package/src/core/feature-types.ts +259 -0
  971. package/src/core/feature.ts +146 -0
  972. package/src/core/fill.ts +22 -0
  973. package/src/core/fmt.ts +332 -0
  974. package/src/core/gacha/feature.ts +213 -0
  975. package/src/core/gacha/kernel.ts +146 -0
  976. package/src/core/game.ts +228 -0
  977. package/src/core/gauge.ts +250 -0
  978. package/src/core/generators.ts +587 -0
  979. package/src/core/graph/nodes.ts +86 -0
  980. package/src/core/graph/stats.ts +305 -0
  981. package/src/core/graph/yields.ts +26 -0
  982. package/src/core/index.ts +56 -0
  983. package/src/core/journal.ts +25 -0
  984. package/src/core/layers/check.ts +106 -0
  985. package/src/core/layers/feature.ts +180 -0
  986. package/src/core/layers/helpers.ts +24 -0
  987. package/src/core/layers/index.ts +6 -0
  988. package/src/core/layers/query.ts +423 -0
  989. package/src/core/layers/rules.ts +342 -0
  990. package/src/core/layers/types.ts +314 -0
  991. package/src/core/levels.ts +307 -0
  992. package/src/core/loadout.ts +419 -0
  993. package/src/core/market.ts +540 -0
  994. package/src/core/missions.ts +257 -0
  995. package/src/core/pace.ts +89 -0
  996. package/src/core/persist.ts +211 -0
  997. package/src/core/plain.ts +234 -0
  998. package/src/core/prefs.ts +106 -0
  999. package/src/core/prestige/prestige.ts +485 -0
  1000. package/src/core/recipes.ts +404 -0
  1001. package/src/core/records.ts +224 -0
  1002. package/src/core/reset-rule.ts +52 -0
  1003. package/src/core/rng.ts +79 -0
  1004. package/src/core/save.ts +219 -0
  1005. package/src/core/seen.ts +66 -0
  1006. package/src/core/settings.ts +40 -0
  1007. package/src/core/spawns.ts +363 -0
  1008. package/src/core/stages.ts +290 -0
  1009. package/src/core/stats.ts +289 -0
  1010. package/src/core/steps.ts +95 -0
  1011. package/src/core/storage.ts +355 -0
  1012. package/src/core/store.ts +482 -0
  1013. package/src/core/streak.ts +207 -0
  1014. package/src/core/sweep.ts +288 -0
  1015. package/src/core/tick.ts +134 -0
  1016. package/src/core/time.ts +39 -0
  1017. package/src/core/tree.ts +514 -0
  1018. package/src/core/vocab.ts +150 -0
  1019. package/src/core/watch.ts +195 -0
  1020. package/src/core/world.ts +13 -0
  1021. package/src/css-vars.d.ts +9 -0
  1022. package/src/devtools/DevPanel.module.css +196 -0
  1023. package/src/devtools/DevPanel.tsx +245 -0
  1024. package/src/devtools/SoundDesk.module.css +1927 -0
  1025. package/src/devtools/SoundDesk.tsx +247 -0
  1026. package/src/devtools/desk/Arrangement.tsx +209 -0
  1027. package/src/devtools/desk/Devices.tsx +371 -0
  1028. package/src/devtools/desk/SoundDeskView.tsx +611 -0
  1029. package/src/devtools/desk/SourceDetail.tsx +799 -0
  1030. package/src/devtools/desk/Sources.tsx +292 -0
  1031. package/src/devtools/desk/Tracks.tsx +396 -0
  1032. package/src/devtools/desk/Tunables.tsx +88 -0
  1033. package/src/devtools/desk/Waveform.tsx +116 -0
  1034. package/src/devtools/desk/context.ts +57 -0
  1035. package/src/devtools/desk/controls.tsx +866 -0
  1036. package/src/devtools/desk/layered.tsx +334 -0
  1037. package/src/devtools/desk/loop.ts +188 -0
  1038. package/src/devtools/desk/model.ts +296 -0
  1039. package/src/devtools/desk/prefs.ts +70 -0
  1040. package/src/devtools/desk/samples.ts +278 -0
  1041. package/src/devtools/desk/scale.ts +190 -0
  1042. package/src/devtools/devTools.ts +58 -0
  1043. package/src/devtools/gate.tsx +29 -0
  1044. package/src/devtools/index.ts +8 -0
  1045. package/src/devtools/sampleHost.ts +84 -0
  1046. package/src/kit/fx/Count.tsx +195 -0
  1047. package/src/kit/fx/Flash.tsx +73 -0
  1048. package/src/kit/fx/Ticker.tsx +125 -0
  1049. package/src/kit/fx/confetti.ts +227 -0
  1050. package/src/kit/fx/digitSnap.ts +46 -0
  1051. package/src/kit/fx/director.ts +409 -0
  1052. package/src/kit/fx/flight.tsx +293 -0
  1053. package/src/kit/fx/gesture.ts +163 -0
  1054. package/src/kit/fx/index.ts +86 -0
  1055. package/src/kit/fx/marks.tsx +243 -0
  1056. package/src/kit/fx/motion.ts +79 -0
  1057. package/src/kit/fx/rarity.ts +59 -0
  1058. package/src/kit/fx/scheme.ts +42 -0
  1059. package/src/kit/fx/throttle.ts +47 -0
  1060. package/src/kit/fx/tokens.ts +129 -0
  1061. package/src/kit/fx/useShake.ts +40 -0
  1062. package/src/kit/index.ts +5 -0
  1063. package/src/kit/reveal/index.ts +35 -0
  1064. package/src/kit/reveal/ladder.ts +34 -0
  1065. package/src/kit/reveal/pity.ts +65 -0
  1066. package/src/kit/reveal/sequence.ts +229 -0
  1067. package/src/kit/reveal/useRevealSequence.tsx +246 -0
  1068. package/src/kit/theme/build.ts +209 -0
  1069. package/src/react/away.ts +178 -0
  1070. package/src/react/boot.ts +21 -0
  1071. package/src/react/clock.ts +104 -0
  1072. package/src/react/gameClock.ts +38 -0
  1073. package/src/react/hashRoute.ts +23 -0
  1074. package/src/react/hotkeys.ts +34 -0
  1075. package/src/react/index.ts +63 -0
  1076. package/src/react/layout.tsx +65 -0
  1077. package/src/react/news.ts +18 -0
  1078. package/src/react/paced.ts +167 -0
  1079. package/src/react/prefs.ts +10 -0
  1080. package/src/react/runtime.ts +93 -0
  1081. package/src/react/sample.tsx +143 -0
  1082. package/src/react/store.tsx +139 -0
  1083. package/src/react/swap.ts +49 -0
  1084. package/src/react/tabTitle.ts +83 -0
  1085. package/src/shader/audio.ts +83 -0
  1086. package/src/shader/canvas.tsx +384 -0
  1087. package/src/shader/glsl.ts +618 -0
  1088. package/src/shader/head.ts +49 -0
  1089. package/src/shader/index.ts +75 -0
  1090. package/src/shader/pool.tsx +262 -0
  1091. package/src/shader/program.ts +121 -0
  1092. package/src/shader/pulse.ts +62 -0
  1093. package/src/shader/scheduler.ts +200 -0
  1094. package/src/shader/stepped.ts +79 -0
  1095. package/src/shader/tokens.ts +136 -0
  1096. package/src/shader/uniforms.ts +138 -0
  1097. package/src/sim/auto.ts +325 -0
  1098. package/src/sim/bare.ts +63 -0
  1099. package/src/sim/contract.ts +228 -0
  1100. package/src/sim/fit.ts +424 -0
  1101. package/src/sim/gate.ts +71 -0
  1102. package/src/sim/index.ts +13 -0
  1103. package/src/sim/print.ts +29 -0
  1104. package/src/sim/profile.ts +158 -0
  1105. package/src/sim/proof-worker.ts +52 -0
  1106. package/src/sim/proof.ts +108 -0
  1107. package/src/sim/schedule.ts +192 -0
  1108. package/src/sim/snapshot.ts +184 -0
  1109. package/src/sim/table.ts +119 -0
  1110. package/src/sim/timeline.ts +63 -0
  1111. package/src/sim/world.ts +176 -0
  1112. package/src/sound/babble.ts +433 -0
  1113. package/src/sound/boot.ts +121 -0
  1114. package/src/sound/capture.ts +105 -0
  1115. package/src/sound/core.gen.ts +7 -0
  1116. package/src/sound/cues.ts +168 -0
  1117. package/src/sound/desk-fx.ts +133 -0
  1118. package/src/sound/desk.ts +1639 -0
  1119. package/src/sound/engine.ts +1029 -0
  1120. package/src/sound/fallback.ts +37 -0
  1121. package/src/sound/gate.ts +53 -0
  1122. package/src/sound/governor.ts +289 -0
  1123. package/src/sound/index.ts +90 -0
  1124. package/src/sound/instruments.ts +260 -0
  1125. package/src/sound/mixer.ts +1347 -0
  1126. package/src/sound/mod.ts +108 -0
  1127. package/src/sound/music/arranger.ts +475 -0
  1128. package/src/sound/music/harmony.ts +169 -0
  1129. package/src/sound/music/sequence.ts +194 -0
  1130. package/src/sound/music/transport.ts +116 -0
  1131. package/src/sound/pack/build.ts +136 -0
  1132. package/src/sound/pack/edit.ts +71 -0
  1133. package/src/sound/pack/ffmpeg.ts +169 -0
  1134. package/src/sound/pack/host.ts +484 -0
  1135. package/src/sound/pack/index.ts +22 -0
  1136. package/src/sound/pack/manifest.ts +94 -0
  1137. package/src/sound/pack/measure.ts +75 -0
  1138. package/src/sound/pack/pipeline.ts +130 -0
  1139. package/src/sound/pack/pitch.ts +128 -0
  1140. package/src/sound/pack/sample.ts +259 -0
  1141. package/src/sound/pack/source.ts +145 -0
  1142. package/src/sound/pack/trim.ts +82 -0
  1143. package/src/sound/port.ts +83 -0
  1144. package/src/sound/prefs.ts +84 -0
  1145. package/src/sound/presets.ts +207 -0
  1146. package/src/sound/protocol.ts +591 -0
  1147. package/src/sound/samples.ts +156 -0
  1148. package/src/sound/space.ts +94 -0
  1149. package/src/sound/tap.ts +71 -0
  1150. package/src/sound/types.ts +726 -0
  1151. package/src/sound/voice.ts +97 -0
  1152. package/src/sound/worklet/processor.js +104 -0
  1153. package/src/sound/zzfx.d.ts +19 -0
  1154. package/src/test/backend.ts +47 -0
  1155. package/src/test/clock.ts +29 -0
  1156. package/src/test/decimal-comparisons.ts +151 -0
  1157. package/src/test/index.ts +6 -0
  1158. package/src/test/parity.ts +87 -0
  1159. package/src/test/render.tsx +14 -0
  1160. package/src/test/store.ts +81 -0
  1161. package/src/three/FpsCounter.tsx +25 -0
  1162. package/src/three/LabelProjector.tsx +21 -0
  1163. package/src/three/Stage.tsx +641 -0
  1164. package/src/three/boot.tsx +185 -0
  1165. package/src/three/cache.ts +127 -0
  1166. package/src/three/caustics.ts +768 -0
  1167. package/src/three/clip.ts +163 -0
  1168. package/src/three/compile.ts +59 -0
  1169. package/src/three/ease.ts +28 -0
  1170. package/src/three/eyes.ts +42 -0
  1171. package/src/three/fps.ts +145 -0
  1172. package/src/three/glance.ts +120 -0
  1173. package/src/three/idle.ts +132 -0
  1174. package/src/three/index.ts +160 -0
  1175. package/src/three/inspect.ts +317 -0
  1176. package/src/three/labels.ts +81 -0
  1177. package/src/three/params.ts +29 -0
  1178. package/src/three/path.ts +85 -0
  1179. package/src/three/perf.ts +118 -0
  1180. package/src/three/pick.ts +34 -0
  1181. package/src/three/poses.ts +255 -0
  1182. package/src/three/post.ts +477 -0
  1183. package/src/three/quality.ts +158 -0
  1184. package/src/three/rig.tsx +286 -0
  1185. package/src/three/spring.ts +90 -0
  1186. package/src/three/sprites.ts +150 -0
  1187. package/src/three/text.ts +68 -0
  1188. package/src/three/timeline.ts +63 -0
  1189. package/src/three/tsl.ts +264 -0
  1190. package/src/three/view.ts +65 -0
  1191. package/src/ui/clear.ts +113 -0
  1192. package/src/ui/confirm.tsx +125 -0
  1193. package/src/ui/crash.tsx +44 -0
  1194. package/src/ui/cx.ts +4 -0
  1195. package/src/ui/dialog.tsx +244 -0
  1196. package/src/ui/feedback.tsx +337 -0
  1197. package/src/ui/focus.ts +44 -0
  1198. package/src/ui/grid.tsx +476 -0
  1199. package/src/ui/hooks.ts +337 -0
  1200. package/src/ui/index.ts +240 -0
  1201. package/src/ui/near.tsx +190 -0
  1202. package/src/ui/page.tsx +236 -0
  1203. package/src/ui/portal.tsx +29 -0
  1204. package/src/ui/position.ts +163 -0
  1205. package/src/ui/press.tsx +255 -0
  1206. package/src/ui/print.tsx +446 -0
  1207. package/src/ui/simple.tsx +154 -0
  1208. package/src/ui/slot.tsx +140 -0
  1209. package/src/ui/tabs.tsx +388 -0
  1210. package/src/ui/tips.tsx +395 -0
  1211. package/src/ui/tooltip.tsx +346 -0
  1212. package/src/ui/tree.tsx +266 -0
  1213. package/src/ui/values.tsx +255 -0
  1214. package/templates/agents/AGENTS.md +33 -0
  1215. package/templates/game/.gitattributes +3 -0
  1216. package/templates/game/.scaffold/README.md +78 -0
  1217. package/templates/game/.scaffold/answers.example.json +107 -0
  1218. package/templates/game/.scaffold/answers.md +41 -0
  1219. package/templates/game/.scaffold/fixtures/dimensions-reset.json +232 -0
  1220. package/templates/game/.scaffold/fixtures/dimensions.json +46 -0
  1221. package/templates/game/.scaffold/fixtures/everything.json +99 -0
  1222. package/templates/game/.scaffold/fixtures/smallest-clicker.json +10 -0
  1223. package/templates/game/.scaffold/fixtures/smallest.json +13 -0
  1224. package/templates/game/.scaffold/generate.ts +1350 -0
  1225. package/templates/game/.scaffold/new.ts +94 -0
  1226. package/templates/game/.scaffold/shape.ts +37 -0
  1227. package/templates/game/README.md.tmpl +42 -0
  1228. package/templates/game/biome.json.tmpl +18 -0
  1229. package/templates/game/design/build-tokens.ts +7 -0
  1230. package/templates/game/design/tokens.json +380 -0
  1231. package/templates/game/dev.ts +11 -0
  1232. package/templates/game/env.d.ts +17 -0
  1233. package/templates/game/index.html.tmpl +13 -0
  1234. package/templates/game/package.json.tmpl +38 -0
  1235. package/templates/game/sim/row.ts +75 -0
  1236. package/templates/game/sim/run.ts +147 -0
  1237. package/templates/game/src/app/AboutSheet.tsx +110 -0
  1238. package/templates/game/src/app/App.tsx +106 -0
  1239. package/templates/game/src/app/Earned.tsx +26 -0
  1240. package/templates/game/src/app/Header.tsx +45 -0
  1241. package/templates/game/src/app/Visitor.tsx +51 -0
  1242. package/templates/game/src/app/app.module.css +83 -0
  1243. package/templates/game/src/app/hooks.ts +8 -0
  1244. package/templates/game/src/app/icons.tsx +137 -0
  1245. package/templates/game/src/app/sound.ts +73 -0
  1246. package/templates/game/src/app/tabs.tsx +50 -0
  1247. package/templates/game/src/content/achievements.ts +50 -0
  1248. package/templates/game/src/content/clicker.ts +14 -0
  1249. package/templates/game/src/content/dimensions.ts +23 -0
  1250. package/templates/game/src/content/economy.ts +9 -0
  1251. package/templates/game/src/content/gacha.ts +49 -0
  1252. package/templates/game/src/content/generators.ts +25 -0
  1253. package/templates/game/src/content/pacing.ts +47 -0
  1254. package/templates/game/src/content/prestige.ts +13 -0
  1255. package/templates/game/src/content/tree.ts +88 -0
  1256. package/templates/game/src/content/visitor.ts +12 -0
  1257. package/templates/game/src/content/words.ts +50 -0
  1258. package/templates/game/src/css-vars.d.ts +9 -0
  1259. package/templates/game/src/game/achievements.ts +70 -0
  1260. package/templates/game/src/game/clicker.ts +21 -0
  1261. package/templates/game/src/game/dimensions.ts +29 -0
  1262. package/templates/game/src/game/gacha.ts +73 -0
  1263. package/templates/game/src/game/game.ts +73 -0
  1264. package/templates/game/src/game/generators.ts +27 -0
  1265. package/templates/game/src/game/income.ts +36 -0
  1266. package/templates/game/src/game/prestige.ts +32 -0
  1267. package/templates/game/src/game/settings.ts +17 -0
  1268. package/templates/game/src/game/stats.ts +97 -0
  1269. package/templates/game/src/game/store.ts +24 -0
  1270. package/templates/game/src/game/tree.ts +32 -0
  1271. package/templates/game/src/game/visitor.ts +28 -0
  1272. package/templates/game/src/game/wallet.ts +26 -0
  1273. package/templates/game/src/main.tsx +8 -0
  1274. package/templates/game/src/screens/Achievements.tsx +95 -0
  1275. package/templates/game/src/screens/Dimensions.tsx +68 -0
  1276. package/templates/game/src/screens/Generators.tsx +57 -0
  1277. package/templates/game/src/screens/Make.tsx +80 -0
  1278. package/templates/game/src/screens/Press.tsx +41 -0
  1279. package/templates/game/src/screens/Prestige.tsx +42 -0
  1280. package/templates/game/src/screens/Pull.tsx +99 -0
  1281. package/templates/game/src/screens/Upgrades.tsx +75 -0
  1282. package/templates/game/src/screens/screens.module.css +57 -0
  1283. package/templates/game/src/shaders/backdrop.ts +36 -0
  1284. package/templates/game/src/shaders/cells.ts +51 -0
  1285. package/templates/game/src/shaders/print.ts +49 -0
  1286. package/templates/game/src/shaders/signal.ts +75 -0
  1287. package/templates/game/src/shaders/surface.ts +25 -0
  1288. package/templates/game/src/shaders/weather.ts +48 -0
  1289. package/templates/game/src/ui/AchievementWall.module.css +58 -0
  1290. package/templates/game/src/ui/AchievementWall.tsx +40 -0
  1291. package/templates/game/src/ui/Arrival.module.css +55 -0
  1292. package/templates/game/src/ui/Arrival.tsx +40 -0
  1293. package/templates/game/src/ui/Backdrop.module.css +17 -0
  1294. package/templates/game/src/ui/Backdrop.tsx +57 -0
  1295. package/templates/game/src/ui/Badge.module.css +16 -0
  1296. package/templates/game/src/ui/Badge.tsx +26 -0
  1297. package/templates/game/src/ui/BuffChip.module.css +38 -0
  1298. package/templates/game/src/ui/BuffChip.tsx +38 -0
  1299. package/templates/game/src/ui/Button.module.css +66 -0
  1300. package/templates/game/src/ui/Button.tsx +52 -0
  1301. package/templates/game/src/ui/BuyAmount.module.css +25 -0
  1302. package/templates/game/src/ui/BuyAmount.tsx +33 -0
  1303. package/templates/game/src/ui/ClickTarget.module.css +43 -0
  1304. package/templates/game/src/ui/ClickTarget.tsx +40 -0
  1305. package/templates/game/src/ui/Counter.module.css +34 -0
  1306. package/templates/game/src/ui/Counter.tsx +61 -0
  1307. package/templates/game/src/ui/CurrencyPill.module.css +32 -0
  1308. package/templates/game/src/ui/CurrencyPill.tsx +30 -0
  1309. package/templates/game/src/ui/Panel.module.css +43 -0
  1310. package/templates/game/src/ui/Panel.tsx +34 -0
  1311. package/templates/game/src/ui/ProgressBar.module.css +50 -0
  1312. package/templates/game/src/ui/ProgressBar.tsx +62 -0
  1313. package/templates/game/src/ui/README.md +80 -0
  1314. package/templates/game/src/ui/RarityChip.module.css +25 -0
  1315. package/templates/game/src/ui/RarityChip.tsx +25 -0
  1316. package/templates/game/src/ui/Sheet.module.css +75 -0
  1317. package/templates/game/src/ui/Sheet.tsx +89 -0
  1318. package/templates/game/src/ui/Shell.module.css +49 -0
  1319. package/templates/game/src/ui/Shell.tsx +100 -0
  1320. package/templates/game/src/ui/TabBar.module.css +88 -0
  1321. package/templates/game/src/ui/TabBar.tsx +73 -0
  1322. package/templates/game/src/ui/Timer.module.css +33 -0
  1323. package/templates/game/src/ui/Timer.tsx +55 -0
  1324. package/templates/game/src/ui/Title.module.css +12 -0
  1325. package/templates/game/src/ui/Title.tsx +23 -0
  1326. package/templates/game/src/ui/Toasts.module.css +58 -0
  1327. package/templates/game/src/ui/Toasts.tsx +39 -0
  1328. package/templates/game/src/ui/Tooltip.module.css +20 -0
  1329. package/templates/game/src/ui/Tooltip.tsx +25 -0
  1330. package/templates/game/src/ui/Tree.module.css +123 -0
  1331. package/templates/game/src/ui/Tree.tsx +107 -0
  1332. package/templates/game/src/ui/index.ts +35 -0
  1333. package/templates/game/src/ui/pageRoot.ts +10 -0
  1334. package/templates/game/src/ui/theme.css +82 -0
  1335. package/templates/game/tsconfig.json +17 -0
  1336. package/templates/tailwind/src/ui/AchievementWall.tsx +47 -0
  1337. package/templates/tailwind/src/ui/Arrival.tsx +51 -0
  1338. package/templates/tailwind/src/ui/Backdrop.tsx +65 -0
  1339. package/templates/tailwind/src/ui/Badge.tsx +31 -0
  1340. package/templates/tailwind/src/ui/BuffChip.tsx +47 -0
  1341. package/templates/tailwind/src/ui/Button.tsx +62 -0
  1342. package/templates/tailwind/src/ui/BuyAmount.tsx +39 -0
  1343. package/templates/tailwind/src/ui/ClickTarget.tsx +50 -0
  1344. package/templates/tailwind/src/ui/Counter.tsx +71 -0
  1345. package/templates/tailwind/src/ui/CurrencyPill.tsx +38 -0
  1346. package/templates/tailwind/src/ui/Panel.tsx +45 -0
  1347. package/templates/tailwind/src/ui/ProgressBar.tsx +75 -0
  1348. package/templates/tailwind/src/ui/README.md +85 -0
  1349. package/templates/tailwind/src/ui/RarityChip.tsx +31 -0
  1350. package/templates/tailwind/src/ui/Sheet.tsx +102 -0
  1351. package/templates/tailwind/src/ui/Shell.tsx +118 -0
  1352. package/templates/tailwind/src/ui/TabBar.tsx +86 -0
  1353. package/templates/tailwind/src/ui/Timer.tsx +64 -0
  1354. package/templates/tailwind/src/ui/Title.tsx +28 -0
  1355. package/templates/tailwind/src/ui/Toasts.tsx +52 -0
  1356. package/templates/tailwind/src/ui/Tooltip.tsx +30 -0
  1357. package/templates/tailwind/src/ui/Tree.tsx +125 -0
  1358. package/templates/tailwind/src/ui/index.ts +36 -0
  1359. package/templates/tailwind/src/ui/pageRoot.ts +10 -0
  1360. package/templates/tailwind/src/ui/theme.css +169 -0
@@ -0,0 +1,26 @@
1
+ # .agents
2
+
3
+ Agent skills that ship with the engine. A skill is a folder with a `SKILL.md` (a name, a description that says when
4
+ to use it, and the instructions) and whatever it reads (`references/`, `scripts/`). They are plain files: any agent
5
+ that reads skills can use them, and so can a person who wants the checklist.
6
+
7
+ | Skill | What it is for |
8
+ | --- | --- |
9
+ | [`watchpot-init`](skills/watchpot-init/SKILL.md) | Make a new game on the engine: an interview, the scaffold (`templates/game/.scaffold/`), then the build that makes it its own. |
10
+
11
+ ## Installing one
12
+
13
+ Copy the skill's folder, or link it, into the skills directory of the agent or the project that should use it. For
14
+ Claude Code that is `~/.claude/skills/` (every project) or `<project>/.claude/skills/` (one project); the folder
15
+ keeps its name, so `watchpot-init` is invoked as `/watchpot-init`.
16
+
17
+ ```sh
18
+ # from a checkout of the engine, or an install of it (node_modules/watchpot)
19
+ cp -r .agents/skills/watchpot-init ~/.claude/skills/ # a copy: update it by copying again
20
+ ln -s "$PWD/.agents/skills/watchpot-init" ~/.claude/skills/watchpot-init # a link: follows the checkout
21
+ ```
22
+
23
+ A skill reads the engine's own files (the scaffold's recipe, the docs), so it works against whichever engine version
24
+ sits beside it or is installed in the project; update the engine and the skill's source of truth moves with it. The
25
+ skills' code examples are type-checked with the engine (`bun check`), so a copy is as current as the engine it came
26
+ from.
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: watchpot-features
3
+ description: >
4
+ Add or change game logic in a watchpot idle game: a new feature with `defineFeature` (state, actions, tick steps,
5
+ derived values, prestige reset, migrations), or a ready-made system from the engine (generators, upgrades,
6
+ achievements, prestige layers, buffs and the rest). Use when the user asks for a new mechanic, currency, building,
7
+ upgrade, unlock, reset layer or rule in a game built on watchpot, or when an action or a tick step misbehaves. Not
8
+ for the page (React screens), the sound (watchpot-sound) or the save format (watchpot-save).
9
+ ---
10
+
11
+ # watchpot-features
12
+
13
+ A watchpot game is a list of features passed to `defineGame`. Each feature owns one slice of the state and says how
14
+ it starts, what the player can do to it, what time does to it, and what a prestige reset does to it. The engine's
15
+ docs are in `node_modules/watchpot/docs/`; read the page for a system before writing one.
16
+
17
+ ## First, look for a ready-made one
18
+
19
+ The engine ships most idle-game systems as `defineX` factories, each with a recipe page: currencies, generators,
20
+ dimensions, upgrades and trees, achievements, missions, challenges, levels and stages, prestige layers, buffs,
21
+ autobuyers, markets, crafting, allocation, gacha, spawns, records, streaks and more (`docs/README.md` lists them).
22
+ A factory brings its state, actions, steps, derived values and sim moves, typed. Hand-write a feature only for what
23
+ none of them covers, and then build it from the engine's helpers (`costAt`, `buyMax`, `D`, `offlineCredit`) rather
24
+ than from scratch.
25
+
26
+ ## A feature, by hand
27
+
28
+ ```ts
29
+ import { D, defineFeature, ZERO } from "watchpot/core";
30
+
31
+ export const pot = defineFeature({
32
+ key: "pot",
33
+ reach: [wallet], // the features this one reads or writes besides itself
34
+ initial: () => ({ heat: 0, boiled: ZERO }),
35
+ actions: (api) => ({
36
+ stoke: () => api.set((s) => void (s.pot.heat = Math.min(1, s.pot.heat + 0.1))),
37
+ }),
38
+ steps: {
39
+ produce: {
40
+ boil: { pass: "tick", run: (s, ctx) => void (s.pot.boiled = s.pot.boiled.add(s.pot.heat * ctx.dtMs / 1000)) },
41
+ },
42
+ },
43
+ reset: { keep: ["heat"] },
44
+ });
45
+ ```
46
+
47
+ - **`key`** names the slice: the state is `s.pot`. It is also the save's key for it, so never rename one that has
48
+ shipped without a migration (watchpot-save).
49
+ - **`reach`** lists every other feature this one touches. The types come from it: a feature that writes
50
+ `s.wallet` without `wallet` in `reach` does not typecheck.
51
+ - **`actions`** change state only inside `api.set(recipe)`. The recipe edits a draft; the engine makes the next
52
+ state from it. Never keep a reference to the draft after the recipe returns.
53
+ - **`steps`** are what time does, grouped by phase. The phases run in order every tick: `guard`, `sync`, `rates`,
54
+ `produce`, `automate`, `settle`, `commit`, `after`. A step's `pass` is `"tick"` (live play, `ctx.dtMs` since the
55
+ last tick) or `"catchUp"` (the gap since the player was last seen, once on load); a step with no `pass` runs in
56
+ both. Put income in `produce`, things that buy on their own in `automate`, unlock checks in `settle`.
57
+ - **`derived`** values are computed from state and cached until what they read changes. Use them for anything shown
58
+ on the page that is worked out (a rate, a price), not stored.
59
+ - **`reset`** is what a prestige reset does to the slice: `"run"` (back to `initial`), `{ keep: [...] }`, a function
60
+ of the old and fresh slice, or `"never"`. A deeper reset layer uses `{ depth, rule }`.
61
+ - **`transient`** lists fields that are never saved (a UI flag, a timer that restarts).
62
+
63
+ Then add the feature to `defineGame({ features: [...] })`. A feature that is not listed is not in the game, and
64
+ the error says so.
65
+
66
+ ## Rules that bite
67
+
68
+ - **Decimals.** Big numbers are `Decimal` (`D(10)`, `ZERO`). Compare with `.lt()`, `.gte()`, `.eq()`, never
69
+ `<`, `>` or `===`, which compare objects and are silently wrong.
70
+ - **No wall clock.** Game logic never calls `Date.now()`: use `ctx.now` in a step or `api.now()` in an action. The
71
+ sim and the offline catch-up both depend on it.
72
+ - **Pure steps.** A step reads the state and `ctx` and writes the draft. No timers, no fetches, no randomness
73
+ except `ctx.rng`.
74
+ - **Shape changes are save changes.** Adding a field is safe (the loader fills it from `initial`). Renaming,
75
+ removing or retyping a saved field needs a migration and a `save.version` bump: see watchpot-save.
76
+
77
+ ## Checking it
78
+
79
+ `bun run verify` typechecks and lints. If the game has a pacing sim (`bun run sim -- --contract`), run it once
80
+ after changing numbers, and read `docs/sim.md` before teaching the auto-player a new move (`moves`).
@@ -0,0 +1,217 @@
1
+ ---
2
+ name: watchpot-init
3
+ description: >
4
+ Make a new idle game on the watchpot engine, start to finish: a short shape interview (fiction and voice, the
5
+ shape of the loop and which engine systems carry it, the words, the session length, the look and its shader
6
+ language), a scaffold that writes a running, saving, paced game into a new repository from the engine's template,
7
+ then the build, where the game is actually made: its loop and one invented mechanic, content in depth, a page that
8
+ is its own, shaders in 2D or 3D as the material of the look, feel, and the one moment it is built around. Built on
9
+ the engine throughout. Use when the user types `/watchpot-init`, asks to start, make, scaffold or spin up a new idle
10
+ game, an incremental, a clicker, a dimensions or layers game, or "a game on the engine". Not for changing an
11
+ existing game (work in that repository) or the engine itself.
12
+ argument-hint: "[a pitch, or a path to an answers.json to scaffold without the interview]"
13
+ ---
14
+
15
+ # watchpot-init
16
+
17
+ A new idle game is a handful of things the user decides and everything else. The user decides what the game is
18
+ about and how it sounds, what shape its loop has, what the player collects and spends, how long a sitting is, and
19
+ what it looks like. Everything else is yours, and it splits in two:
20
+
21
+ - **The scaffold** (minutes, mechanical): ids, numbers, file layout, which engine system carries what, the pacing
22
+ bands. A script in the engine writes it from an answers file.
23
+ - **The build** (most of the session): what makes this game unlike the last one. Its loop and an invention, content
24
+ with depth, a page of its own, a shader language, feel, the moment. The engine exists so the time goes here.
25
+
26
+ A game that stops at the scaffold is a template with new nouns. Never report one as done.
27
+
28
+ ## The engine
29
+
30
+ `watchpot` is a Bun + TypeScript + React idle-game engine. Throughout this skill **`ENGINE`** is the root of a
31
+ checkout of its repository, or `node_modules/watchpot` in a project that has it installed. This skill ships inside the
32
+ engine (`ENGINE/.agents/skills/watchpot-init/`); if it was copied or linked elsewhere and no project at hand has the
33
+ engine, install it in a scratch folder first (`bun add watchpot`).
34
+
35
+ What is in `ENGINE`, and read from there rather than from this skill:
36
+
37
+ - `README.md` is the reference; `docs/` is the guide (`docs/guide/`), a recipe and a type-checked example per system,
38
+ the glossary, and `docs/migrating-to-1.0.md` for anything written against 0.x.
39
+ - `templates/game/` is the template this skill fills, and `templates/game/.scaffold/` is the recipe: `README.md`
40
+ (what the scaffold wires, how it is gated), **`answers.md` (the answers file's schema: read it first, so every
41
+ interview question lands on a field)**, `new.ts` (the one command), `generate.ts`, and `fixtures/` (the smallest
42
+ answers files).
43
+ - The subpaths a game imports: `watchpot/core` (the store, saves, big numbers, the clock and offline time, and the
44
+ **systems**: `references/systems.md`), `watchpot/ui` (headless components: behaviour, keyboard, focus, ARIA; no
45
+ look), `watchpot/shader`, `watchpot/three`, `watchpot/kit` (effects with no look), `watchpot/sound`,
46
+ `watchpot/react`, `watchpot/sim` (the auto-player, the pacing contract, the fit kit), `watchpot/test`,
47
+ `watchpot/devtools` (the dev panel). A game installs the engine as an ordinary dependency;
48
+ `ENGINE/templates/game/.scaffold/README.md` says which version the scaffold pins and how to change it.
49
+
50
+ **Engine first, always.** Before writing a mechanic, a component's behaviour, a price curve, a formatter, a fold of
51
+ effects or a reset's pace, find it in the engine (`references/systems.md`, the README, `docs/`). If the engine lacks
52
+ something, build it in the game, on the engine's primitives. Never edit `node_modules/watchpot` and never copy engine
53
+ source into a game.
54
+
55
+ ## This skill's references
56
+
57
+ All in `references/`: `systems.md` (which engine system carries what, the shapes to offer, how features connect, what
58
+ to do when the engine lacks something), `build.md` (the seven passes of the build), `look.md` and `type.md` (palettes,
59
+ surfaces, font pairings with checked specs), `shaders.md` (the shader floor and how to drive it), and `examples/`
60
+ (`invention.ts`, `sim-and-tests.ts`, `shader-surface.tsx`: code the engine type-checks, so it is current with the API).
61
+
62
+ ## Lines that do not move
63
+
64
+ - **Product and look questions only.** Never ask about ids, numbers, folder layout, primitives or internals.
65
+ - **Questions with options, the recommendation first** and marked "(Recommended)" (the `AskUserQuestion` tool where
66
+ the agent has one): the best game, not the cheapest build, with any cost stated beside it as a fact. Options are
67
+ concrete (names, hexes, font names, a sentence of what the player sees), never "something cosy". The user's own
68
+ words are always an answer.
69
+ - **Three rounds at most, then one confirm.** Assert what a pitch already says instead of asking it again.
70
+ - **The scaffold runs from an answers file.** The interview's only output is `answers.json` (schema:
71
+ `ENGINE/templates/game/.scaffold/answers.md`); the script does the rest and runs the same with no interview.
72
+ - **Shaders are the look's material, in 2D as much as 3D** (`references/shaders.md`): every game has a backdrop that
73
+ is the place, a hero surface, light as feedback and a shader in its moment, all written for it and driven by its
74
+ numbers. The scaffold's backdrop is a placeholder.
75
+ - **Every look is the game's own.** The template's components are plain skeletons to be restyled; no vendor shader
76
+ or UI package; nothing lifted from another game's files.
77
+ - **Fonts are Google-hosted** (the template links them; nothing is downloaded), from `references/type.md`.
78
+ **Sounds** start as the template's zzfx voices and are designed in the build (retuned, or recordings built into a
79
+ pack with the zzfx voice kept as the fallback).
80
+ - **Never push.** The scaffold commits on `main` in the new repository; pushing, and creating a GitHub repository,
81
+ are the user's call, asked at the end.
82
+ - **Project and user rules win** where an `AGENTS.md`, a `CLAUDE.md` or another skill says otherwise.
83
+
84
+ ## The interview
85
+
86
+ It is a design brief for a game: purpose and player, the material, the look, then a brief to confirm. Read
87
+ `ENGINE/templates/game/.scaffold/answers.md` first so every question lands on a field, and `references/systems.md` so
88
+ the shapes you offer are real.
89
+
90
+ **Before round 1**, from the pitch (if any), assert in one short message: the fiction as you read it, the player
91
+ and the use scene (where and how long they play), the shape you would pick, and whether it is 2D (the default) or
92
+ 3D (only when the pitch is about a place or an object to look at; see "A 3D game"). A precise pitch can skip the
93
+ questions its assertion covers.
94
+
95
+ **Round 1: the game** (one call, up to four questions):
96
+
97
+ 1. **Fiction.** Three premises, each a title and one sentence, far apart in setting (and far from the games already
98
+ made unless asked); the pitch's own reading first when there is one.
99
+ 2. **Shape.** Three shapes composed for this fiction from `references/systems.md` (a core loop plus the systems that
100
+ make it a genre), each one sentence of what the player does in a minute and in a day, not a list of features:
101
+ "press the bell, hire ringers, catch the comet when it passes, melt it all down for a bigger bell". Recommend the
102
+ one with a reset and something to chase: an idle game without them runs out by day two.
103
+ 3. **Session length:** a glance (many check-ins of a minute or two), short sessions (a handful a day, about ten
104
+ minutes; recommended for a desk game), or long sittings (two or three a day, most of an hour, tab left open).
105
+ This shapes the days after the first: the first three or four hours of any idle game are played straight, and
106
+ pacing is planned and measured in played hours (`references/build.md` › Feel).
107
+ 4. **Voice:** three registers, each with a sample line in it (a producer's flavour line).
108
+
109
+ **Round 2: the words** (one call, up to four questions, each option a complete set written in the voice; ask only
110
+ what the shape has):
111
+
112
+ 1. **Currencies:** the main currency (what the core makes), and the premium one if a gacha: three pairs.
113
+ 2. **Stats:** the names of output, offline share and (with a reset) the reset's gain: three sets.
114
+ 3. **The reset** (if any): its name, the button's verb and the currency it pays: three sets.
115
+ 4. **The ladder** (gacha only): three, four or five rungs named in the fiction. Or, for a clicker with no gacha,
116
+ **the thing pressed**: its name and the press's verb.
117
+
118
+ The producers, the tree, the gacha's items, the achievements, the visitor, the tab names and every word not asked are
119
+ yours to write, in the voice. They show in the confirm.
120
+
121
+ **Round 3: the look** (one call, four questions; `references/look.md`, `references/type.md`):
122
+
123
+ 1. **Palette:** three palettes built for the fiction, each named and described in a line, with its hexes. At least
124
+ one dark and one light.
125
+ 2. **Type:** three pairings, each with what it says about the game.
126
+ 3. **The surface:** three shader languages, each a sentence the player could picture, naming what moves and what the
127
+ game's numbers do to it. This is the brief every shader in the game is written against.
128
+ 4. **The moment:** three candidates for the one memorable moment the look is built around (the first top-rung pull,
129
+ the first reset, a wall falling), each a sentence of what the player sees. The build makes it for real.
130
+
131
+ **The confirm.** Write `answers.json` (in a scratch folder), then one message: the brief, compressed (job and player,
132
+ the loop, the words, the look, the surface, the moment), the generated lists, **the invention** (one line: the
133
+ mechanic this game will have that the engine does not hand it), the target folder (a new folder named for the slug, wherever the user keeps their games; theirs to say) and
134
+ the engine version it will pin (default: the engine's own). Then one question: build it (recommended) / change
135
+ something. Take a change, rewrite the file, ask again.
136
+
137
+ When the user is away, take every recommended option, write the answers, list the calls at the top of the report,
138
+ scaffold and build.
139
+
140
+ ## The scaffold
141
+
142
+ Run the engine's own command (`ENGINE` is its path), with the answers file and an empty or missing target:
143
+
144
+ ```sh
145
+ bun ENGINE/templates/game/.scaffold/new.ts <answers.json> <target> --agents [--engine <tag>] [--no-install]
146
+ ```
147
+
148
+ `--agents` is on because a game made through this skill is being built with an agent: it adds a short `AGENTS.md`
149
+ and puts the concept and the answers in `design/`, where the build reads them.
150
+
151
+ It copies the template, writes the game from the answers (content, `design/tokens.json`, the starter backdrop, the
152
+ `*.tmpl` files), compiles the tokens, installs and formats, and refuses a non-empty target or an answers
153
+ file with a problem (it lists every problem at once). What it wires, how the template is gated by flag, what
154
+ `--engine` pins and how to install the engine from the npm package instead of a git tag are in
155
+ `ENGINE/templates/game/.scaffold/README.md`; read it rather than this file.
156
+
157
+ Then, in the new game's folder:
158
+
159
+ ```sh
160
+ git init -b main
161
+ bun run gates # typecheck, lint and the production build, before anything is committed
162
+ bun run sim -- --contract # the pacing contract on played hours
163
+ git add -A && git commit -m "feat: scaffold <name> on watchpot <version>"
164
+ ```
165
+
166
+ Stop at the first failing step and name it to the user. A fresh scaffold that fails is a bug in the engine's
167
+ template, not in the game: say so, and fix only what the game needs to run.
168
+
169
+ ## The build
170
+
171
+ Go straight on from the scaffold (one line to the user that it is up and where; no question). Follow
172
+ `references/build.md`, in order, a commit per pass with `bun run verify` green. The seven passes:
173
+
174
+ 1. **Shape:** the systems the scaffold does not wire, what to take out, and the invention (engine first, built in
175
+ the game).
176
+ 2. **Content:** depth, in the voice, all in `src/content/`.
177
+ 3. **Identity:** restyle every copied component and compose the screens for this game.
178
+ 4. **Shaders:** the surface (`references/shaders.md`).
179
+ 5. **Feel:** sound, numbers that land where the action was, big events that feel big, reduced motion honoured.
180
+ 6. **The moment**, built and watched.
181
+ 7. **Proof:** `gates:full`, the browser at desktop and phone width with a clean console.
182
+
183
+ Do the passes yourself. Fan out to subagents only if the user asked for that (and give its cost first).
184
+
185
+ ### A 3D game
186
+
187
+ When the pitch is a place or an object to look at, the game's page is a scene on `watchpot/three` (three's WebGPU
188
+ renderer, TSL materials, `@react-three/fiber`; `ENGINE/docs/three.md` and `docs/examples/three-stage.tsx`). Scaffold as
189
+ usual for the economy, saves and sim, then in the build replace the shell's main screen with a `Stage`: the
190
+ game writes its meshes, materials and content and takes the frame loop, post stack, quality tiers, boot, camera and
191
+ world-pinned labels from the engine. A change to rendering counts only after it has drawn in a browser.
192
+
193
+ ## After
194
+
195
+ Report in a few lines: where the game is, its shape, what was invented, the sim's day-7 row, and the commands
196
+ (`bun run dev`, `bun run sim -- --contract`). Then ask one thing: whether to create the GitHub repository and push
197
+ (`gh repo create <slug> --private --source . --push`), or start playing first.
198
+
199
+ ## What goes wrong
200
+
201
+ - **Trusting the sim on boredom.** Its player never gets bored. A page the sim trades happily can leave a person
202
+ waiting twenty minutes for anything to happen. Work out the real-minute wait between payoffs on every active
203
+ mechanic and keep it under about two minutes.
204
+ - **Stopping at the scaffold.** It runs and it is green, so it feels finished. It is the first ten minutes.
205
+ - **Hand-writing what the engine has.** A price loop, a buy-max, an achievement check, a focus trap, a countdown, a
206
+ fold of effects, a reset's pace and peak. Search `references/systems.md` and the engine README first.
207
+ - **The template's look, recoloured.** New tokens on the skeleton are not an identity; neither is the starter
208
+ backdrop in new colours.
209
+ - **A shader nobody would miss.** Put the effort where the player looks and where the numbers are.
210
+ - **A sim that is not the game.** The sim runs on a plain store; if the game has something only the real store has,
211
+ the fitted numbers are for another game. `plainParity` (`watchpot/test`) checks the two agree.
212
+ - **Asking about internals.** "How fast should costs grow?" is yours; "how long is a sitting?" is the user's. The
213
+ pacing contract turns the second into the first.
214
+ - **Vague options.** A palette without hexes, a voice without a sample line, a surface without a sentence: the user
215
+ cannot pick what they cannot see.
216
+ - **A font outside `references/type.md`.** A css2 spec that asks for a weight the family lacks fails the whole
217
+ request, and the game falls back to system fonts silently.
@@ -0,0 +1,127 @@
1
+ # The build
2
+
3
+ The scaffold produces a game that runs, saves, paces and passes its gates in a few minutes. It is not the game: it is
4
+ a skeleton with the right words on it, and it looks and plays like every other scaffold. The build is where the game
5
+ gets made, and it is most of the work. This file is the seven passes and how to do each one well. Do them in order, commit after each (`feat(<area>): …`,
6
+ `bun run verify` green), and keep going until every "done when" holds. The engine is what makes this affordable:
7
+ mechanism, behaviour, saving, pacing and the shader container are already written, so the hours go into what only
8
+ this game has.
9
+
10
+ Before the first pass, add four short sections to the game's `design/concept.md` (the scaffold wrote the
11
+ fiction, the loop, the look and the moment from the interview) so every later decision has something to answer to:
12
+ **the shape** (the loop in one paragraph: what the player does in a minute, in ten, in a day), **the surface** (the
13
+ shader language, `shaders.md`), **the invention** (the one mechanic no other game on the engine has), and **the
14
+ pacing plan** (played hours the game should last, and what the player is doing in each stretch).
15
+
16
+ ## 1. Shape: make the loop this game's
17
+
18
+ - Add every system the interview chose that the scaffold does not wire, from its recipe page (`systems.md`): a content
19
+ file in `src/content/`, the factory call in `src/game/`, a line in `defineGame`, a screen, a row in the pacing
20
+ contract. A factory's own moves reach the sim without more code; check with `bun run sim` that the auto-player
21
+ buys from it (it warns once about a feature with a `buy…` action and no moves).
22
+ - Build every connection with the engine's: a feature reads another through `reach`, a computed value is `derived`,
23
+ an effect is a contribution or a source on the game's `stats` feature, a reset layer is `definePrestige` (its pace
24
+ and peak are the layer's). `src/game/` holding a hand-written fold, a copied price loop, a second copy of a number
25
+ that a step keeps in step, or a whole-game state type is the sign the engine's own was missed.
26
+ - Take out what the game does not want. A template tab nobody chose is clutter.
27
+ - **Build the invention** in the game (`systems.md` › When the engine lacks it): a `defineFeature()` shaped like
28
+ `examples/invention.ts`, with derived values, a `produce` step that names its pass, and moves for the sim.
29
+ - Re-pace: `bun run sim -- --contract`. Move a band only on purpose, and say why in the commit. For a move that does
30
+ not pay at once (an unlock, a cap), state its `worth`; `autoPlayer`'s `objective` is income a second unless the
31
+ game's loop wants something else (`examples/sim-and-tests.ts`).
32
+ - **Tests are the user's call.** The template ships none. If the user wants them, `watchpot/test` is the kit: test
33
+ what can break in the game's own logic (an ordering, an invariant, a boundary), never content, strings, shader
34
+ text or a retune. Two of its checks are worth having in any game that has tests: `decimalComparisons` (no two
35
+ Decimals compared with `<` or `===`) and `plainParity` (the sim's plain store and the page's real store play one
36
+ seed identically; a feature that fails it usually keeps something outside the state).
37
+
38
+ ## 2. Content: depth, in the voice
39
+
40
+ - The scaffold writes the minimum. A game wants eight to twelve producers, not five; an upgrade list with a reason to
41
+ pick an order; an achievement wall of at least four full rows (the wall is a promise of how much game there is, so
42
+ write names that make the player want the next one, and include a few secret ones); flavour that changes as the game
43
+ goes on (the ticker, the journal of time away).
44
+ - Every name and line is written for this fiction, in the voice, specific and short. Nothing called "Upgrade 3". No
45
+ line that would fit another game.
46
+ - All of it lives in `src/content/`. A number is content too: tune it there, then run the contract. Effects are
47
+ `{ stat, add }` or `{ stat, mul }` typed to the game's stat ids; an upgrade with more than one rank says its
48
+ `costGrowth`; cost curves round up unless told `round: "none"`.
49
+
50
+ ## 3. Identity: the page
51
+
52
+ - The components in `src/ui/` arrive as plain skeletons on the engine's headless primitives, reading a small token
53
+ contract (`src/ui/README.md`). They are the game's now: restyle every one. Start from the tokens
54
+ (`design/tokens.json`, then `bun run tokens`), then each component's CSS, then delete what the game does not use.
55
+ - Compose the main screen around the hero surface and the moment, not as a stack of panels. Where does the eye rest?
56
+ What is the biggest thing on the page, and is it the thing the game is about?
57
+ - If an `impeccable` skill is installed, use it for this pass (`shape` for the brief if the look is not yet decided,
58
+ then `craft`; `bolder` if it came out timid, `polish` at the end), giving it the game's concept and voice.
59
+ - Phone and desktop both: the shell's wide and narrow layouts are different compositions, not one squeezed.
60
+ - Icons and glyphs are drawn for the game (inline SVG), not picked from the template's set.
61
+
62
+ ## 4. Shaders: the surface
63
+
64
+ Follow `shaders.md`. The floor is a backdrop that is the place, a hero surface, light as feedback, and the moment;
65
+ each with a `still`, a reduced-motion frame and a budget, each fed by the game's numbers.
66
+
67
+ ## 5. Feel: every action answers
68
+
69
+ - A sound for every action the player takes on purpose, designed for the fiction: retune the template's zzfx voices,
70
+ or build a pack from recordings (`buildPack`, `docs/sound-packs.md`) and give each cue `takes` with the zzfx voice
71
+ kept until the pack has loaded. Quiet enough to hear a thousand times; the mix on buses (`docs/sound-mix.md`).
72
+ - A press or a buy shows what it did where it happened. `docs/feel.md` is the mechanism: `createGestures` knows whose
73
+ doing a change was, `createMarks` and `kick` answer it at the point, `Count` counts a figure up, `createDirector`
74
+ rations what plays when the machine makes hundreds of things a minute. `FloatingNumbers` and the rest of the
75
+ headless primitives are in `docs/ui.md`. Big events (a milestone, an achievement, a top-rung pull) get more: a
76
+ shake, a toast, a `u_pulse` (`createPulse`).
77
+ - Coming back after time away says what happened while the player was gone (`docs/time-away.md`).
78
+ - Reduced motion turns all of it down to state changes; nothing is lost but the movement.
79
+
80
+ - **Played by a person.** For every active mechanic, state the real-minute wait between payoffs and keep it under
81
+ about two minutes; long waits belong only to idle and offline progress. Every extreme a UI shows must be reachable
82
+ in normal play. The sim measures pacing, not boredom: check both, and state the wait from a sim line.
83
+ - **Pacing is in played hours.** Plan, measure and report pacing as hours a person spends actively playing, for a
84
+ player who no-lifes it. Nobody starts an idle game and goes idle: the first three or four hours are played straight
85
+ whatever the session length (which shapes only what comes after), unless being idle is the game's gimmick. Measure
86
+ with the engine's `activeSchedule`, not a session schedule, and state the played hours in the report.
87
+ - **A long target is filled, not stretched.** "A page a day" means a day's worth of things to do on that page, not
88
+ prices raised until it takes a day. When a stretch runs short of its target, add content there (upgrades, a
89
+ mechanic, a goal); slow a number only when it is out of line with the content around it.
90
+ - **The length is what the content makes it.** A target length is a guess at how much there is to do, never a quota.
91
+ When a stretch plays shorter than planned, add things worth doing there or let the game be shorter; never slow a
92
+ rate, raise a price or throttle an automation to reach the target, and never pad with filler ranks either.
93
+ - **A currency that compounds drains its shop at a steady rate.** When a currency grows by a share of itself (a market
94
+ trader, interest), geometric prices turn that into a constant number of buys an hour: too timid and the page is dead
95
+ for hours, bold and the whole shop is bought in an afternoon and its multipliers land early. Measure buys per played
96
+ hour on `activeSchedule` before shipping the page, and size the shop to the rate that feels right.
97
+ - **Nobody times trades by hand.** A buy-low-sell-high loop the player must watch is a chore: give a market its
98
+ `trader` from the open (or a different shape), so the player only spends.
99
+ - **Check the page at its extremes.** The longest figure the game can print on one line, a row at its max rank, the
100
+ tallest screen's content inside the window: look at each in the browser before calling a screen done.
101
+ - **A big game is fitted, not tuned by hand.** Once there are more gates than prices can be set by feel, write the
102
+ plan (the minute each gate should open) and let the sim price them: `docs/plan-and-fit.md`, then `docs/fit-kit.md`
103
+ for a long run (`fitTable`, snapshots and resuming, `proveFit`, the profiler `profileSim`). Three things before
104
+ trusting a fit: the proof replays the fit's own run, at the fit's quality (fit at `exact` to prove; a `quick` draft
105
+ is unproved); a table that is to be proved takes `priceAbove`, not `nicePrice`; and a `derived` value that reads
106
+ the fit table is not recomputed when the fit writes a price, so read the table in a step or a `select`.
107
+
108
+ ## 6. The moment
109
+
110
+ Build the interview's one memorable moment for real: the mechanics that make it happen, the shader that carries it,
111
+ the sound, the words, and a way to replay it in development (`#dev` on the engine's `DevPanel`, which warps time and
112
+ edits the save; `pinShaderClock` holds every canvas on one instant for a screenshot; a URL flag on a throwaway save).
113
+ It is the thing the player will describe to someone else.
114
+
115
+ ## 7. Proof
116
+
117
+ - `bun run gates:full` once (typecheck, lint, the build, the pacing contract).
118
+ - In a browser (`bun run dev`; one tab, closed when done): every screen at desktop and at phone width, a clean
119
+ console, the save surviving a reload, the main loop playable by keyboard alone, the OS reduced-motion setting
120
+ honoured, a light and a dark scheme if the game has both. The checks do not run a browser: a shader that fails to
121
+ compile and a blank page both pass them.
122
+ - The game's `AGENTS.md` still matches the code: its commands and where things go.
123
+
124
+ ## The report
125
+
126
+ A few lines: where it is, what shape it has, what was invented, the sim's day-7 row (`bun run sim -- --sessions`), the commands. Then one question: create the GitHub
127
+ repository and push, or play first.
@@ -0,0 +1,134 @@
1
+ // What a game's own mechanic looks like on the 1.0 engine: a feature of its own (`kiln`) beside the engine's factories.
2
+ // It declares a derived value instead of a hand-written fold, feeds the stats through a source, earns in a `produce`
3
+ // step that names its pass, orders a second step with `after`, offers the sim a move, and reaches the wallet and the
4
+ // stats lazily. The prestige layer pays its currency into the wallet (`payInto`) and keeps the reset pace itself.
5
+ //
6
+ // This file is type-checked with the engine (`bun check`); it is the shape to copy, not a game.
7
+ import {
8
+ costAt,
9
+ D,
10
+ type Decimal,
11
+ defineCurrencies,
12
+ defineFeature,
13
+ defineGame,
14
+ definePrestige,
15
+ defineStats,
16
+ powerGain,
17
+ type StateOf,
18
+ vocab,
19
+ } from "watchpot/core";
20
+
21
+ const WORDS = vocab({ currencies: ["ash", "cinders"], stats: ["output", "gain"] });
22
+
23
+ /** Every balance. `cinders` is the prestige currency: it outlives a run reset (`depth: "never"`), which `payInto` needs. */
24
+ export const wallet = defineCurrencies({
25
+ key: "wallet",
26
+ vocab: WORDS,
27
+ start: { ash: D(0), cinders: D(0) },
28
+ depth: { cinders: "never" },
29
+ earnedThisRun: { ash: "earned" },
30
+ });
31
+
32
+ /**
33
+ * The game's own mechanic: not an engine system, so a `defineFeature()`. `glaze` is a derived value: never saved, never
34
+ * written, worked out again only when `fired` changes. Nothing keeps a second copy of it in a step.
35
+ */
36
+ export const kiln = defineFeature({
37
+ key: "kiln",
38
+ initial: () => ({ fired: 0 }),
39
+ derived: { glaze: (s) => D(1).add(s.kiln.fired * 0.25) },
40
+ actions: (api) => ({
41
+ fire: () =>
42
+ api.set((s) => {
43
+ s.kiln.fired += 1;
44
+ }),
45
+ }),
46
+ });
47
+
48
+ /** Every contribution to a stat, declared once. The kiln's glaze multiplies output; it reads the derived value. */
49
+ export const numbers = defineStats({
50
+ key: "stats",
51
+ vocab: WORDS,
52
+ reach: () => [kiln],
53
+ stats: { output: { base: 1 }, gain: { base: 1 } },
54
+ sources: [{ label: "Kiln", owner: "kiln", effects: [{ stat: "output", mul: (q) => q.kiln.glaze }] }],
55
+ });
56
+
57
+ /** Ash a second at one stoke, before the stats. */
58
+ const PER_STOKE = D(2);
59
+ /** What the next stoke costs: the engine's price curve, not a hand-written loop. `round` defaults to up. */
60
+ const STOKE_PRICE = (stoked: number): Decimal => costAt({ base: 10, growth: 1.15 }, stoked);
61
+ /** The most ash the hearth holds. */
62
+ const HEARTH = D("1e12");
63
+
64
+ /** The core's income, as the invention reads it: reaches the wallet and the stats, lazily. */
65
+ export const furnace = defineFeature({
66
+ key: "furnace",
67
+ reach: () => [wallet, numbers],
68
+ initial: () => ({ stoked: 1 }),
69
+ derived: { perSecond: (s) => PER_STOKE.mul(s.furnace.stoked).mul(s.stats.output) },
70
+ actions: (api) => ({
71
+ // Says whether it went through, which a move's `apply` must.
72
+ stoke: () =>
73
+ api.set((s) => {
74
+ if (s.wallet.ash.lt(STOKE_PRICE(s.furnace.stoked))) return false;
75
+ s.wallet.ash = s.wallet.ash.sub(STOKE_PRICE(s.furnace.stoked));
76
+ s.furnace.stoked += 1;
77
+ return true;
78
+ }),
79
+ }),
80
+ steps: {
81
+ produce: {
82
+ // An earning step names its pass: "both" pays the whole time away as well, with no cap. Say "tick" and add a
83
+ // "catchUp" twin to pay an away rate instead.
84
+ burn: {
85
+ pass: "both",
86
+ run: (s, ctx) => {
87
+ wallet.draft.credit(s, "ash", s.furnace.perSecond.mul(ctx.dtMs / 1000));
88
+ },
89
+ },
90
+ // Orders itself against another step of the same phase; a derived value would need no order at all.
91
+ cap: {
92
+ pass: "both",
93
+ after: "furnace.produce.burn",
94
+ run: (s) => {
95
+ s.wallet.ash = s.wallet.ash.min(HEARTH);
96
+ },
97
+ },
98
+ },
99
+ },
100
+ // What the sim's auto-player may buy. No `worth`: it is worked out from the objective (see `sim-and-tests.ts`).
101
+ moves: (s) => [
102
+ {
103
+ id: "stoke",
104
+ cost: { currency: "ash", amount: STOKE_PRICE(s.furnace.stoked) },
105
+ apply: (store) => store.getState().furnace.stoke(),
106
+ },
107
+ ],
108
+ });
109
+
110
+ /** The prestige layer: pays `cinders` into the wallet, keeps its own run start and peak pace (`s.ascension.pace`). */
111
+ export const ascension = definePrestige({
112
+ key: "ascension",
113
+ action: "ascend",
114
+ reach: [wallet, numbers],
115
+ payInto: { wallet, currency: "cinders" },
116
+ gain: (s) => powerGain(s.wallet.earned, { k: 1, exp: 0.5, per: 1000, mult: s.stats.gain }),
117
+ // A reset the sim should take: once it would pay at least one and as much again as is held.
118
+ worth: (s) => {
119
+ const gain = powerGain(s.wallet.earned, { k: 1, exp: 0.5, per: 1000, mult: s.stats.gain });
120
+ return gain.gte(1) && gain.gte(s.wallet.cinders) ? gain.toNumber() : 0;
121
+ },
122
+ });
123
+
124
+ export const game = defineGame({
125
+ id: "kiln-example",
126
+ save: { key: "kiln-example.save", version: 1 },
127
+ vocab: WORDS,
128
+ features: [wallet, kiln, numbers, furnace, ascension],
129
+ });
130
+
131
+ export type GameState = StateOf<typeof game.features>;
132
+
133
+ /** A Decimal read off the state is compared with `.gte()` and friends, never `>=`: `bun check` and the test kit catch it. */
134
+ export const rich = (s: GameState): boolean => (s.wallet.ash as Decimal).gte(1000);