@reicek/neataptic-ts 0.1.21 → 0.1.23

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 (361) hide show
  1. package/.github/agents/boundary-mapper.agent.md +31 -0
  2. package/.github/agents/docs-scout.agent.md +29 -0
  3. package/.github/agents/plan-scout.agent.md +31 -0
  4. package/.github/agents/solid-split.agent.md +143 -0
  5. package/.github/copilot-instructions.md +119 -0
  6. package/.github/skills/solid-split-playbook/SKILL.md +220 -0
  7. package/.github/skills/solid-split-playbook/assets/docs-checklist.md +34 -0
  8. package/.github/skills/solid-split-playbook/assets/split-plan-template.md +48 -0
  9. package/.github/skills/solid-split-playbook/assets/split-workflow-checklist.md +51 -0
  10. package/.github/skills/trace-analyzer-extension/SKILL.md +63 -0
  11. package/.github/skills/trace-analyzer-extension/assets/extension-checklist.md +24 -0
  12. package/.github/skills/trace-analyzer-extension/references/analyzer-extension-workflow.md +101 -0
  13. package/.github/skills/trace-audit-reporting/SKILL.md +96 -0
  14. package/.github/skills/trace-audit-reporting/assets/performance-report-template.md +123 -0
  15. package/.github/skills/trace-audit-reporting/references/trace-analysis-workflow.md +132 -0
  16. package/package.json +7 -3
  17. package/plans/ES2023 migration +13 -8
  18. package/plans/Evolution_Training_Interoperability_Contracts.md +1 -1
  19. package/plans/Flappy_Bird_Folder_Documentation_Pass.md +53 -0
  20. package/plans/Flappy_Evolution_Worker_Documentation_Pass.md +58 -0
  21. package/plans/Interactive_Examples_and_Learning_Path.md +10 -2
  22. package/plans/Memory_Optimization.md +3 -3
  23. package/plans/README.md +63 -0
  24. package/plans/Roadmap.md +15 -3
  25. package/plans/asciiMaze_SOLID_split.done.md +130 -0
  26. package/plans/flappy_bird_SOLID_split.done.md +67 -0
  27. package/scripts/analyze-trace.ts +590 -0
  28. package/scripts/assets/theme.css +221 -34
  29. package/scripts/copy-examples.mjs +9 -5
  30. package/scripts/export-onnx.mjs +3 -3
  31. package/scripts/generate-bench-tables.mjs +10 -10
  32. package/scripts/generate-bench-tables.ts +10 -10
  33. package/scripts/generate-docs.ts +1415 -449
  34. package/scripts/render-docs-html.ts +15 -8
  35. package/src/README.md +127 -222
  36. package/src/architecture/README.md +117 -184
  37. package/src/architecture/architect.ts +6 -0
  38. package/src/architecture/layer/README.md +38 -38
  39. package/src/architecture/network/README.md +49 -31
  40. package/src/architecture/network/activate/README.md +77 -77
  41. package/src/architecture/network/connect/README.md +15 -13
  42. package/src/architecture/network/deterministic/README.md +7 -7
  43. package/src/architecture/network/evolve/README.md +44 -44
  44. package/src/architecture/network/gating/README.md +20 -20
  45. package/src/architecture/network/genetic/README.md +51 -51
  46. package/src/architecture/network/mutate/README.md +97 -97
  47. package/src/architecture/network/network.types.ts +39 -0
  48. package/src/architecture/network/onnx/README.md +264 -264
  49. package/src/architecture/network/prune/README.md +39 -39
  50. package/src/architecture/network/remove/README.md +26 -26
  51. package/src/architecture/network/serialize/README.md +56 -56
  52. package/src/architecture/network/serialize/network.serialize.json.utils.ts +1 -0
  53. package/src/architecture/network/serialize/network.serialize.utils.ts +6 -1
  54. package/src/architecture/network/serialize/network.serialize.utils.types.ts +1 -1
  55. package/src/architecture/network/slab/README.md +61 -61
  56. package/src/architecture/network/standalone/README.md +24 -24
  57. package/src/architecture/network/stats/README.md +9 -9
  58. package/src/architecture/network/topology/README.md +46 -46
  59. package/src/architecture/network/training/README.md +21 -21
  60. package/src/architecture/network.ts +114 -10
  61. package/src/methods/README.md +9 -87
  62. package/src/multithreading/README.md +8 -77
  63. package/src/multithreading/workers/README.md +2 -2
  64. package/src/multithreading/workers/browser/README.md +0 -6
  65. package/src/multithreading/workers/node/README.md +0 -3
  66. package/src/neat/README.md +623 -568
  67. package/src/neat/neat.evolve.population.utils.ts +29 -5
  68. package/src/neat/neat.helpers.ts +16 -0
  69. package/src/neat/neat.topology-intent.utils.ts +160 -0
  70. package/src/utils/README.md +18 -18
  71. package/test/examples/asciiMaze/README.md +59 -59
  72. package/test/examples/asciiMaze/asciiMaze.e2e.test.ts +14 -9
  73. package/test/examples/asciiMaze/browser-entry/README.md +196 -0
  74. package/test/examples/asciiMaze/browser-entry/browser-entry.abort.services.ts +95 -0
  75. package/test/examples/asciiMaze/browser-entry/browser-entry.constants.ts +23 -0
  76. package/test/examples/asciiMaze/browser-entry/browser-entry.curriculum.services.ts +115 -0
  77. package/test/examples/asciiMaze/browser-entry/browser-entry.globals.services.ts +106 -0
  78. package/test/examples/asciiMaze/browser-entry/browser-entry.host.services.ts +157 -0
  79. package/test/examples/asciiMaze/browser-entry/browser-entry.services.ts +14 -0
  80. package/test/examples/asciiMaze/browser-entry/browser-entry.ts +129 -0
  81. package/test/examples/asciiMaze/browser-entry/browser-entry.types.ts +120 -0
  82. package/test/examples/asciiMaze/browser-entry/browser-entry.utils.ts +98 -0
  83. package/test/examples/asciiMaze/browser-entry.ts +10 -576
  84. package/test/examples/asciiMaze/dashboardManager/README.md +276 -0
  85. package/test/examples/asciiMaze/dashboardManager/archive/README.md +16 -0
  86. package/test/examples/asciiMaze/dashboardManager/archive/dashboardManager.archive.services.ts +267 -0
  87. package/test/examples/asciiMaze/dashboardManager/dashboardManager.constants.ts +35 -0
  88. package/test/examples/asciiMaze/dashboardManager/dashboardManager.services.ts +103 -0
  89. package/test/examples/asciiMaze/dashboardManager/dashboardManager.ts +181 -0
  90. package/test/examples/asciiMaze/dashboardManager/dashboardManager.types.ts +267 -0
  91. package/test/examples/asciiMaze/dashboardManager/dashboardManager.utils.ts +254 -0
  92. package/test/examples/asciiMaze/dashboardManager/live/README.md +14 -0
  93. package/test/examples/asciiMaze/dashboardManager/live/dashboardManager.live.services.ts +264 -0
  94. package/test/examples/asciiMaze/dashboardManager/telemetry/README.md +47 -0
  95. package/test/examples/asciiMaze/dashboardManager/telemetry/dashboardManager.telemetry.services.ts +513 -0
  96. package/test/examples/asciiMaze/dashboardManager.ts +13 -2335
  97. package/test/examples/asciiMaze/evolutionEngine/README.md +1058 -0
  98. package/test/examples/asciiMaze/evolutionEngine/curriculumPhase.ts +90 -0
  99. package/test/examples/asciiMaze/evolutionEngine/engineState.constants.ts +36 -0
  100. package/test/examples/asciiMaze/evolutionEngine/engineState.ts +58 -513
  101. package/test/examples/asciiMaze/evolutionEngine/engineState.types.ts +212 -0
  102. package/test/examples/asciiMaze/evolutionEngine/engineState.utils.ts +301 -0
  103. package/test/examples/asciiMaze/evolutionEngine/evolutionEngine.types.ts +445 -0
  104. package/test/examples/asciiMaze/evolutionEngine/evolutionLoop.ts +81 -50
  105. package/test/examples/asciiMaze/evolutionEngine/optionsAndSetup.ts +2 -4
  106. package/test/examples/asciiMaze/evolutionEngine/populationDynamics.ts +17 -33
  107. package/test/examples/asciiMaze/evolutionEngine/populationPruning.ts +1 -1
  108. package/test/examples/asciiMaze/evolutionEngine/rngAndTiming.ts +1 -2
  109. package/test/examples/asciiMaze/evolutionEngine/sampling.ts +1 -1
  110. package/test/examples/asciiMaze/evolutionEngine/scratchPools.ts +2 -5
  111. package/test/examples/asciiMaze/evolutionEngine/setupHelpers.ts +30 -37
  112. package/test/examples/asciiMaze/evolutionEngine/telemetryMetrics.ts +16 -58
  113. package/test/examples/asciiMaze/evolutionEngine/trainingWarmStart.ts +2 -2
  114. package/test/examples/asciiMaze/evolutionEngine.ts +55 -55
  115. package/test/examples/asciiMaze/fitness.ts +2 -2
  116. package/test/examples/asciiMaze/fitness.types.ts +65 -0
  117. package/test/examples/asciiMaze/interfaces.ts +64 -1352
  118. package/test/examples/asciiMaze/mazeMovement/README.md +356 -0
  119. package/test/examples/asciiMaze/mazeMovement/finalization/README.md +49 -0
  120. package/test/examples/asciiMaze/mazeMovement/finalization/mazeMovement.finalization.ts +138 -0
  121. package/test/examples/asciiMaze/mazeMovement/mazeMovement.constants.ts +101 -0
  122. package/test/examples/asciiMaze/mazeMovement/mazeMovement.services.ts +230 -0
  123. package/test/examples/asciiMaze/mazeMovement/mazeMovement.ts +299 -0
  124. package/test/examples/asciiMaze/mazeMovement/mazeMovement.types.ts +185 -0
  125. package/test/examples/asciiMaze/mazeMovement/mazeMovement.utils.ts +153 -0
  126. package/test/examples/asciiMaze/mazeMovement/policy/README.md +91 -0
  127. package/test/examples/asciiMaze/mazeMovement/policy/mazeMovement.policy.ts +467 -0
  128. package/test/examples/asciiMaze/mazeMovement/runtime/README.md +95 -0
  129. package/test/examples/asciiMaze/mazeMovement/runtime/mazeMovement.runtime.ts +354 -0
  130. package/test/examples/asciiMaze/mazeMovement/shaping/README.md +124 -0
  131. package/test/examples/asciiMaze/mazeMovement/shaping/mazeMovement.shaping.ts +459 -0
  132. package/test/examples/asciiMaze/mazeMovement.ts +12 -2978
  133. package/test/examples/flappy_bird/README.md +193 -88
  134. package/test/examples/flappy_bird/browser-entry/README.md +1441 -0
  135. package/test/examples/flappy_bird/browser-entry/browser-entry.host.utils.ts +4 -324
  136. package/test/examples/flappy_bird/browser-entry/browser-entry.network-view.utils.ts +9 -396
  137. package/test/examples/flappy_bird/browser-entry/browser-entry.playback.utils.ts +6 -714
  138. package/test/examples/flappy_bird/browser-entry/browser-entry.render.types.ts +26 -3
  139. package/test/examples/flappy_bird/browser-entry/browser-entry.runtime.types.ts +16 -1
  140. package/test/examples/flappy_bird/browser-entry/browser-entry.simulation.types.ts +39 -5
  141. package/test/examples/flappy_bird/browser-entry/browser-entry.spawn.utils.ts +11 -31
  142. package/test/examples/flappy_bird/browser-entry/browser-entry.stats.types.ts +32 -4
  143. package/test/examples/flappy_bird/browser-entry/browser-entry.ts +11 -0
  144. package/test/examples/flappy_bird/browser-entry/browser-entry.types.ts +8 -0
  145. package/test/examples/flappy_bird/browser-entry/browser-entry.visualization.types.ts +50 -7
  146. package/test/examples/flappy_bird/browser-entry/browser-entry.visualization.utils.ts +21 -893
  147. package/test/examples/flappy_bird/browser-entry/browser-entry.worker.types.ts +91 -10
  148. package/test/examples/flappy_bird/browser-entry/host/README.md +318 -0
  149. package/test/examples/flappy_bird/browser-entry/host/host.canvas.service.ts +16 -0
  150. package/test/examples/flappy_bird/browser-entry/host/host.constants.ts +20 -0
  151. package/test/examples/flappy_bird/browser-entry/host/host.dom.service.ts +10 -0
  152. package/test/examples/flappy_bird/browser-entry/host/host.resize.service.ts +1 -295
  153. package/test/examples/flappy_bird/browser-entry/host/host.stats.service.ts +14 -0
  154. package/test/examples/flappy_bird/browser-entry/host/host.ts +592 -6
  155. package/test/examples/flappy_bird/browser-entry/host/host.types.ts +13 -0
  156. package/test/examples/flappy_bird/browser-entry/host/resize/README.md +309 -0
  157. package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.constants.ts +47 -0
  158. package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.services.ts +392 -0
  159. package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.ts +132 -0
  160. package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.types.ts +92 -0
  161. package/test/examples/flappy_bird/browser-entry/host/resize/host.resize.service.utils.ts +272 -0
  162. package/test/examples/flappy_bird/browser-entry/network-view/README.md +389 -0
  163. package/test/examples/flappy_bird/browser-entry/network-view/network-view.draw.service.ts +13 -0
  164. package/test/examples/flappy_bird/browser-entry/network-view/network-view.labels.utils.ts +12 -0
  165. package/test/examples/flappy_bird/browser-entry/network-view/network-view.layout.utils.ts +14 -0
  166. package/test/examples/flappy_bird/browser-entry/network-view/network-view.topology.utils.ts +267 -0
  167. package/test/examples/flappy_bird/browser-entry/network-view/network-view.ts +823 -7
  168. package/test/examples/flappy_bird/browser-entry/network-view/network-view.types.ts +11 -0
  169. package/test/examples/flappy_bird/browser-entry/playback/README.md +845 -0
  170. package/test/examples/flappy_bird/browser-entry/playback/background/README.md +355 -0
  171. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/README.md +1068 -0
  172. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.batch.services.ts +64 -0
  173. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.cache.services.ts +207 -0
  174. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.constants.ts +197 -0
  175. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.batch.utils.ts +114 -0
  176. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.layout.utils.test.ts +96 -0
  177. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.layout.utils.ts +204 -0
  178. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.services.ts +49 -0
  179. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.geometry.utils.ts +313 -0
  180. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.layer.services.ts +81 -0
  181. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.math.utils.test.ts +33 -0
  182. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.math.utils.ts +201 -0
  183. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.pulse.selection.utils.ts +171 -0
  184. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.pulse.timing.utils.ts +124 -0
  185. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.pulse.utils.test.ts +279 -0
  186. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.pulse.utils.ts +132 -0
  187. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.scene.services.ts +26 -0
  188. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.services.ts +65 -0
  189. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.ts +48 -0
  190. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.types.ts +342 -0
  191. package/test/examples/flappy_bird/browser-entry/playback/background/ground-grid/playback.background.ground-grid.utils.ts +10 -0
  192. package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.cache.services.ts +96 -0
  193. package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.constants.ts +127 -0
  194. package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.draw.services.ts +184 -0
  195. package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.scene.services.ts +64 -0
  196. package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.services.ts +6 -0
  197. package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.ts +53 -0
  198. package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.types.ts +105 -0
  199. package/test/examples/flappy_bird/browser-entry/playback/background/playback.background.utils.ts +100 -0
  200. package/test/examples/flappy_bird/browser-entry/playback/frame-render/README.md +541 -0
  201. package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.bird.utils.ts +180 -0
  202. package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.canvas.services.ts +77 -0
  203. package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.entity.services.ts +167 -0
  204. package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.scene.services.ts +57 -0
  205. package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.service.test.ts +176 -0
  206. package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.service.ts +113 -0
  207. package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.services.ts +35 -0
  208. package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.trail.utils.ts +248 -0
  209. package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.types.ts +103 -0
  210. package/test/examples/flappy_bird/browser-entry/playback/frame-render/playback.frame-render.utils.ts +11 -0
  211. package/test/examples/flappy_bird/browser-entry/playback/playback.constants.ts +1 -1
  212. package/test/examples/flappy_bird/browser-entry/playback/playback.frame-render.service.ts +10 -0
  213. package/test/examples/flappy_bird/browser-entry/playback/playback.iteration.services.ts +192 -0
  214. package/test/examples/flappy_bird/browser-entry/playback/playback.loop.service.ts +12 -0
  215. package/test/examples/flappy_bird/browser-entry/playback/playback.orchestration.types.ts +78 -0
  216. package/test/examples/flappy_bird/browser-entry/playback/playback.render.pipe-outline.service.ts +128 -0
  217. package/test/examples/flappy_bird/browser-entry/playback/playback.render.service.ts +1 -116
  218. package/test/examples/flappy_bird/browser-entry/playback/playback.session.services.ts +184 -0
  219. package/test/examples/flappy_bird/browser-entry/playback/playback.snapshot.utils.test.ts +121 -0
  220. package/test/examples/flappy_bird/browser-entry/playback/playback.snapshot.utils.ts +8 -0
  221. package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.layer.services.ts +36 -0
  222. package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.service.ts +11 -128
  223. package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.services.ts +268 -0
  224. package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.types.ts +91 -0
  225. package/test/examples/flappy_bird/browser-entry/playback/playback.starfield.utils.ts +11 -4
  226. package/test/examples/flappy_bird/browser-entry/playback/playback.trail.utils.ts +9 -86
  227. package/test/examples/flappy_bird/browser-entry/playback/playback.ts +75 -7
  228. package/test/examples/flappy_bird/browser-entry/playback/playback.types.ts +12 -9
  229. package/test/examples/flappy_bird/browser-entry/playback/playback.worker-channel.utils.ts +11 -123
  230. package/test/examples/flappy_bird/browser-entry/playback/snapshot/README.md +55 -0
  231. package/test/examples/flappy_bird/browser-entry/playback/snapshot/playback.snapshot.services.ts +103 -0
  232. package/test/examples/flappy_bird/browser-entry/playback/snapshot/playback.snapshot.summary.utils.test.ts +45 -0
  233. package/test/examples/flappy_bird/browser-entry/playback/snapshot/playback.snapshot.summary.utils.ts +28 -0
  234. package/test/examples/flappy_bird/browser-entry/playback/trail/README.md +95 -0
  235. package/test/examples/flappy_bird/browser-entry/playback/trail/playback.trail.history.services.test.ts +35 -0
  236. package/test/examples/flappy_bird/browser-entry/playback/trail/playback.trail.history.services.ts +64 -0
  237. package/test/examples/flappy_bird/browser-entry/playback/trail/playback.trail.opacity.utils.test.ts +37 -0
  238. package/test/examples/flappy_bird/browser-entry/playback/trail/playback.trail.opacity.utils.ts +74 -0
  239. package/test/examples/flappy_bird/browser-entry/playback/worker-channel/README.md +71 -0
  240. package/test/examples/flappy_bird/browser-entry/playback/worker-channel/playback.worker-channel.request.services.ts +45 -0
  241. package/test/examples/flappy_bird/browser-entry/playback/worker-channel/playback.worker-channel.summary.services.ts +74 -0
  242. package/test/examples/flappy_bird/browser-entry/playback/worker-channel/playback.worker-channel.types.ts +53 -0
  243. package/test/examples/flappy_bird/browser-entry/runtime/README.md +304 -0
  244. package/test/examples/flappy_bird/browser-entry/runtime/runtime.browser-globals.service.ts +15 -0
  245. package/test/examples/flappy_bird/browser-entry/runtime/runtime.errors.ts +17 -0
  246. package/test/examples/flappy_bird/browser-entry/runtime/runtime.evolution-launch.service.ts +56 -0
  247. package/test/examples/flappy_bird/browser-entry/runtime/runtime.evolution-loop.service.ts +19 -0
  248. package/test/examples/flappy_bird/browser-entry/runtime/runtime.lifecycle.service.ts +96 -0
  249. package/test/examples/flappy_bird/browser-entry/runtime/runtime.startup.service.ts +92 -0
  250. package/test/examples/flappy_bird/browser-entry/runtime/runtime.telemetry.service.ts +24 -0
  251. package/test/examples/flappy_bird/browser-entry/runtime/runtime.ts +31 -121
  252. package/test/examples/flappy_bird/browser-entry/runtime/runtime.types.ts +65 -0
  253. package/test/examples/flappy_bird/browser-entry/visualization/README.md +568 -0
  254. package/test/examples/flappy_bird/browser-entry/visualization/visualization.colors.utils.ts +26 -0
  255. package/test/examples/flappy_bird/browser-entry/visualization/visualization.constants.ts +110 -0
  256. package/test/examples/flappy_bird/browser-entry/visualization/visualization.draw.service.ts +979 -19
  257. package/test/examples/flappy_bird/browser-entry/visualization/visualization.legend.utils.ts +157 -3
  258. package/test/examples/flappy_bird/browser-entry/visualization/visualization.topology.utils.ts +13 -27
  259. package/test/examples/flappy_bird/browser-entry/visualization/visualization.ts +7 -20
  260. package/test/examples/flappy_bird/browser-entry/visualization/visualization.types.ts +14 -0
  261. package/test/examples/flappy_bird/browser-entry/worker-channel/README.md +238 -0
  262. package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.errors.ts +11 -0
  263. package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.generation.service.ts +12 -0
  264. package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.playback.service.test.ts +143 -0
  265. package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.playback.service.ts +140 -14
  266. package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.request.service.ts +27 -0
  267. package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.ts +8 -0
  268. package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.types.ts +23 -0
  269. package/test/examples/flappy_bird/browser-entry/worker-channel/worker-channel.url.service.ts +5 -0
  270. package/test/examples/flappy_bird/constants/README.md +1163 -0
  271. package/test/examples/flappy_bird/constants/constants.birds.ts +16 -38
  272. package/test/examples/flappy_bird/constants/constants.difficulty.ts +21 -0
  273. package/test/examples/flappy_bird/constants/constants.network-view.ts +24 -0
  274. package/test/examples/flappy_bird/constants/constants.network.ts +1 -1
  275. package/test/examples/flappy_bird/constants/constants.observation.ts +7 -0
  276. package/test/examples/flappy_bird/constants/constants.palette.ts +9 -2
  277. package/test/examples/flappy_bird/constants/constants.physics.ts +9 -0
  278. package/test/examples/flappy_bird/constants/constants.pipe-render.ts +3 -0
  279. package/test/examples/flappy_bird/constants/constants.pipes.ts +22 -3
  280. package/test/examples/flappy_bird/constants/constants.runtime.ts +28 -4
  281. package/test/examples/flappy_bird/constants/constants.starfield.ts +78 -3
  282. package/test/examples/flappy_bird/constants/constants.ts +6 -0
  283. package/test/examples/flappy_bird/environment/README.md +182 -0
  284. package/test/examples/flappy_bird/environment/environment.collision.utils.ts +7 -0
  285. package/test/examples/flappy_bird/environment/environment.constants.ts +16 -3
  286. package/test/examples/flappy_bird/environment/environment.observation.utils.ts +12 -19
  287. package/test/examples/flappy_bird/environment/environment.state.service.ts +10 -0
  288. package/test/examples/flappy_bird/environment/environment.step.service.ts +15 -66
  289. package/test/examples/flappy_bird/environment/environment.types.ts +14 -0
  290. package/test/examples/flappy_bird/evaluation/README.md +155 -0
  291. package/test/examples/flappy_bird/evaluation/evaluation.constants.ts +23 -4
  292. package/test/examples/flappy_bird/evaluation/evaluation.fitness.utils.ts +16 -1
  293. package/test/examples/flappy_bird/evaluation/evaluation.rollout.service.ts +7 -374
  294. package/test/examples/flappy_bird/evaluation/evaluation.seed.utils.ts +4 -0
  295. package/test/examples/flappy_bird/evaluation/evaluation.types.ts +18 -2
  296. package/test/examples/flappy_bird/evaluation/rollout/README.md +355 -0
  297. package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.constants.ts +38 -0
  298. package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.service.ts +71 -0
  299. package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.services.ts +338 -0
  300. package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.types.ts +69 -0
  301. package/test/examples/flappy_bird/evaluation/rollout/evaluation.rollout.utils.ts +399 -0
  302. package/test/examples/flappy_bird/flappy-evolution-worker/README.md +845 -0
  303. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.constants.ts +49 -7
  304. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.errors.ts +34 -3
  305. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.evolution.service.ts +22 -0
  306. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.playback.service.ts +62 -26
  307. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.protocol.service.ts +27 -1
  308. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.runtime.service.ts +23 -0
  309. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.simulation.frame.service.ts +378 -0
  310. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.simulation.types.ts +22 -0
  311. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.simulation.utils.ts +20 -203
  312. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.snapshot.utils.test.ts +94 -0
  313. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.snapshot.utils.ts +78 -13
  314. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.ts +235 -344
  315. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.types.ts +170 -22
  316. package/test/examples/flappy_bird/flappy-evolution-worker/flappy-evolution-worker.warm-start.service.ts +314 -0
  317. package/test/examples/flappy_bird/flappy.simulation.shared.utils.ts +17 -0
  318. package/test/examples/flappy_bird/flappyEnvironment.ts +21 -0
  319. package/test/examples/flappy_bird/flappyEvaluation.ts +12 -0
  320. package/test/examples/flappy_bird/flappyEvolution.worker.ts +7 -0
  321. package/test/examples/flappy_bird/index.ts +8 -2
  322. package/test/examples/flappy_bird/rng.ts +10 -0
  323. package/test/examples/flappy_bird/simulation-shared/README.md +518 -0
  324. package/test/examples/flappy_bird/simulation-shared/observation/README.md +255 -0
  325. package/test/examples/flappy_bird/simulation-shared/observation/observation.features.utils.ts +339 -0
  326. package/test/examples/flappy_bird/simulation-shared/observation/observation.ts +19 -0
  327. package/test/examples/flappy_bird/simulation-shared/observation/observation.vector.utils.ts +81 -0
  328. package/test/examples/flappy_bird/simulation-shared/simulation-shared.constants.ts +3 -0
  329. package/test/examples/flappy_bird/simulation-shared/simulation-shared.control.utils.ts +6 -0
  330. package/test/examples/flappy_bird/simulation-shared/simulation-shared.difficulty.utils.ts +9 -0
  331. package/test/examples/flappy_bird/simulation-shared/simulation-shared.errors.ts +10 -1
  332. package/test/examples/flappy_bird/simulation-shared/simulation-shared.memory.utils.ts +18 -0
  333. package/test/examples/flappy_bird/simulation-shared/simulation-shared.observation.utils.ts +7 -402
  334. package/test/examples/flappy_bird/simulation-shared/simulation-shared.spawn.utils.ts +36 -6
  335. package/test/examples/flappy_bird/{evaluation/evaluation.statistics.utils.ts → simulation-shared/simulation-shared.statistics.utils.ts} +30 -9
  336. package/test/examples/flappy_bird/simulation-shared/simulation-shared.types.ts +38 -5
  337. package/test/examples/flappy_bird/trainFlappyBird.ts +13 -0
  338. package/test/examples/flappy_bird/trainer/README.md +676 -0
  339. package/test/examples/flappy_bird/trainer/evaluation/README.md +253 -0
  340. package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.constants.ts +15 -0
  341. package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.services.ts +86 -0
  342. package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.ts +187 -0
  343. package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.types.ts +32 -0
  344. package/test/examples/flappy_bird/trainer/evaluation/trainer.evaluation.service.utils.ts +182 -0
  345. package/test/examples/flappy_bird/trainer/trainer.evaluation.service.ts +13 -0
  346. package/test/examples/flappy_bird/trainer/trainer.fitness.service.ts +23 -1
  347. package/test/examples/flappy_bird/trainer/trainer.loop.service.ts +17 -1
  348. package/test/examples/flappy_bird/trainer/trainer.report.service.services.ts +181 -0
  349. package/test/examples/flappy_bird/trainer/trainer.report.service.ts +136 -0
  350. package/test/examples/flappy_bird/trainer/trainer.selection.utils.ts +89 -0
  351. package/test/examples/flappy_bird/trainer/trainer.setup.service.ts +22 -0
  352. package/test/examples/flappy_bird/trainer/trainer.signals.service.ts +8 -0
  353. package/test/examples/flappy_bird/trainer/trainer.ts +38 -553
  354. package/test/examples/flappy_bird/trainer/trainer.types.ts +44 -7
  355. package/test/neat/neat.topology-intent.test.ts +129 -0
  356. package/test/network/network.topology-intent.test.ts +44 -0
  357. package/test/examples/flappy_bird/browser-entry/browser-entry.utils.ts +0 -12
  358. package/test/examples/flappy_bird/environment/environment.ts +0 -7
  359. package/test/examples/flappy_bird/evaluation/evaluation.ts +0 -7
  360. package/test/examples/flappy_bird/simulation-shared/simulation-shared.ts +0 -15
  361. package/test/examples/flappy_bird/trainer/trainer.statistics.utils.ts +0 -78
@@ -0,0 +1,31 @@
1
+ ---
2
+ description: "Use when planning a refactor, splitting a large module, identifying orchestration files versus helpers, or mapping module boundaries before edits. Keywords: refactor, split file, boundaries, helpers, orchestration, module map."
3
+ name: "Boundary Mapper"
4
+ tools: [read, search, todo]
5
+ user-invocable: false
6
+ agents: []
7
+ ---
8
+ You are a read-only refactor planning specialist for NeatapticTS.
9
+
10
+ Your job is to map folder responsibilities, identify orchestration files versus helper/detail files, and propose small safe edit boundaries before implementation begins.
11
+
12
+ ## Constraints
13
+ - DO NOT edit files.
14
+ - DO NOT propose a large rewrite when a sequence of targeted edits is safer.
15
+ - DO NOT ignore folder README guidance or plan alignment when the task is architectural.
16
+ - For demo/example tasks, DO NOT map only the demo boundary when the public library API or runtime contract is the real seam that should change.
17
+
18
+ ## Approach
19
+ 1. Read the nearest folder `README.md` and parent README when needed.
20
+ 2. For architectural work, read `plans/README.md` and the single most relevant detailed plan.
21
+ 3. Identify whether the triggering issue is truly demo-local or whether the demo is surfacing a reusable library DX gap.
22
+ 4. Identify the public API surface, orchestration file, helper clusters, tests, and likely affected neighbors.
23
+ 5. Return a stepwise decomposition that favors small, documented, low-risk passes.
24
+
25
+ ## Output Format
26
+ Return:
27
+ - `Primary orchestration file:` path.
28
+ - `Helper clusters:` short bullet list.
29
+ - `Likely affected tests/docs:` short bullet list.
30
+ - `Suggested edit sequence:` 3 to 6 numbered steps.
31
+ - `Risk notes:` 0 to 4 short bullets.
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: "Use when checking generated folder README context, JSDoc drift, missing examples, stale docs, or deciding whether to update source comments versus run npm run docs. Keywords: README, JSDoc, docs, generated docs, drift, examples."
3
+ name: "Docs Scout"
4
+ tools: [read, search]
5
+ user-invocable: false
6
+ agents: []
7
+ ---
8
+ You are a read-only documentation reconnaissance specialist for NeatapticTS.
9
+
10
+ Your job is to use generated folder `README.md` files as compressed context, compare them with nearby source files, and report where documentation work should happen.
11
+
12
+ ## Constraints
13
+ - DO NOT edit generated `src/**/README.md` files.
14
+ - DO NOT suggest hand-editing generated READMEs.
15
+ - DO NOT rewrite code behavior; focus on documentation drift, missing explanation, and likely source JSDoc targets.
16
+
17
+ ## Approach
18
+ 1. Read the nearest folder `README.md` first, then the nearest useful parent README if the task spans sibling modules.
19
+ 2. Read only the source files needed to verify the README summary against implementation.
20
+ 3. Distinguish between three cases: README is sufficient, JSDoc should be improved, or docs likely just need regeneration with `npm run docs`.
21
+ 4. Call out examples, invariants, or exported symbols that seem under-documented.
22
+
23
+ ## Output Format
24
+ Return:
25
+ - `Folder README used:` path list.
26
+ - `Assessment:` one short paragraph.
27
+ - `JSDoc targets:` short bullet list of source files or exported symbols.
28
+ - `Docs refresh needed:` `yes` or `no`, with a one-line reason.
29
+ - `User-facing gaps:` 0 to 4 short bullets.
@@ -0,0 +1,31 @@
1
+ ---
2
+ description: "Use when selecting a relevant plan document, checking roadmap alignment, mapping trigger phrases to plans, or preparing an architectural alignment brief before coding. Keywords: plans, roadmap, architecture, NEAT correctness, ONNX, workers, checkpointing, visualization."
3
+ name: "Plan Scout"
4
+ tools: [read, search]
5
+ user-invocable: false
6
+ agents: []
7
+ ---
8
+ You are a read-only plan alignment specialist for NeatapticTS.
9
+
10
+ Your job is to identify the smallest useful subset of `plans/` documents for a task and return a compact alignment brief.
11
+
12
+ ## Constraints
13
+ - DO NOT edit files.
14
+ - DO NOT read the whole `plans/` directory unless the task explicitly requires broad roadmap synthesis.
15
+ - DO NOT recommend a plan file without explaining why it matches the task.
16
+ - For demo or example work, DO NOT default to demo-local compensation when the symptom points to a library/API/defaults gap; call out the higher-leverage library fix explicitly.
17
+
18
+ ## Approach
19
+ 1. Read `plans/README.md` first.
20
+ 2. If the task concerns core NEAT architecture or evolutionary correctness, read `plans/neat.plans.md` next.
21
+ 3. Otherwise read only the single most relevant detailed plan, with at most one additional related plan when necessary.
22
+ 4. For demo-driven tasks, determine whether the demo is exposing a reusable library ergonomics gap and prefer plan alignment that fixes the library rather than the demo symptom.
23
+ 5. Extract terminology, constraints, sequencing hints, and any likely code/plan mismatch risks.
24
+
25
+ ## Output Format
26
+ Return:
27
+ - `Primary plan:` path and one-sentence reason.
28
+ - `Optional secondary plan:` path and one-sentence reason, or `none`.
29
+ - `Key terms:` short comma-separated list.
30
+ - `Guardrails:` 2 to 4 short bullets.
31
+ - `Possible mismatch risks:` 0 to 3 short bullets.
@@ -0,0 +1,143 @@
1
+ ---
2
+ description: "Use when executing a deliberate SOLID module split, folderizing a large file, starting from a user-specified root such as #file:flappy_bird, following or creating a durable split plan, improving JSDoc so generated README files read naturally, updating plan progress, and ending each completed step with a handoff prompt for the next session. Keywords: SOLID split, split plan, folderize, module boundary, orchestration-first, compatibility re-export, generated README, JSDoc, handoff prompt."
3
+ name: "solid-split"
4
+ tools: [read, edit, search, execute, todo, agent]
5
+ argument-hint: "Describe the module to split, the plan file to follow or create, and the single current step to complete."
6
+ agents: ["Boundary Mapper", "Plan Scout", "Docs Scout"]
7
+ user-invocable: true
8
+ ---
9
+ You are a plan-first SOLID refactor execution agent for NeatapticTS.
10
+
11
+ Your job is to complete one durable split step at a time, keep the codebase aligned with a resumable plan document, and end every completed step with a handoff prompt that is ready to start the next step in a new session.
12
+
13
+ You should follow the companion skill `solid-split-playbook` when it is available. Treat that skill as the canonical repository workflow for README-first reconnaissance, plan discipline, documentation upgrades, validation expectations, and final handoff quality.
14
+
15
+ ## Constraints
16
+ - ALWAYS locate and follow the most relevant existing plan in `plans/` before editing.
17
+ - If no suitable durable plan exists, create one in `plans/` before making implementation edits.
18
+ - ALWAYS keep the plan high-level and resumable, using durable progress markers like `[]` and `[DONE]`.
19
+ - ALWAYS keep a todo list with exactly one active implementation item for the current step.
20
+ - ONLY complete one durable plan step per invocation unless the user explicitly overrides that rule.
21
+ - DO NOT move on to the next plan step in the same session after finishing the current one.
22
+ - DO NOT leave the plan file stale after completing or materially reshaping a step.
23
+ - DO NOT hand-edit generated README files; improve source JSDoc and run docs generation when needed.
24
+ - DO improve touched public JSDoc so generated README output becomes richer, more educational, and easier to navigate after the split.
25
+ - DO NOT break stable import paths when a compatibility facade or re-export shim is required.
26
+ - Prefer folder-first module boundaries and orchestration-first main files.
27
+
28
+ ## Required Workflow
29
+ 1. Read the nearest folder `README.md` and the nearest useful parent README when the split spans sibling areas.
30
+ 2. Read `plans/README.md` first for architectural work, then read only the single most relevant detailed plan, with at most one additional related plan if needed.
31
+ 3. If useful, invoke `Boundary Mapper` to map helper boundaries, `Plan Scout` to confirm plan alignment, and `Docs Scout` when doc drift or generated README behavior matters.
32
+ 4. Find the current plan step to execute. If no durable plan exists, create one modeled after `plans/asciiMaze_SOLID_split.md`: short purpose, durable progress rules, concise target shape, explicit execution steps, and done criteria.
33
+ 5. Convert the current step into a tight todo list with one active item.
34
+ 6. Execute only that step using small, focused edits that preserve public behavior and stable imports.
35
+ 7. Treat generated README files as doc-gap detectors. If the README would read too thinly after the split, improve the touched source JSDoc before validating.
36
+ 8. Update the plan immediately after the step is complete or if the durable step ordering changes.
37
+ 9. Run the minimum validation needed for touched files and stated done criteria, such as TypeScript checks, docs generation, or build validation.
38
+ 10. Stop after reporting the completed step. Do not continue into the next step automatically.
39
+
40
+ ## Split Execution Rules
41
+ - Keep the main `module/module.ts` file orchestration-first.
42
+ - Move one helper category at a time behind focused files or subfolders.
43
+ - Reduce the old top-level file to a compatibility re-export when stable imports must keep working.
44
+ - Improve JSDoc on exported or public surfaces touched by the split.
45
+ - When a concept is important to understanding the boundary, prefer richer educational JSDoc that explains the why and, when useful, points readers toward a high-value background reference such as a relevant Wikipedia topic.
46
+ - Prefer declarative top-level flow and keep implementation detail below the fold in helpers or services.
47
+ - Preserve existing style, naming conventions, and ES2023-first patterns.
48
+
49
+ ## If Blocked
50
+ - If the current step cannot be completed safely, stop without advancing the plan step to `[DONE]`.
51
+ - Record only durable plan changes, not temporary debugging notes.
52
+ - Return the blocker, the smallest safe next action, and a revised handoff prompt for the next session.
53
+
54
+ ## Output Format
55
+ Return:
56
+ - `Plan file:` path and whether it was followed, created, or updated.
57
+ - `Completed step:` exact plan step label, or `blocked`.
58
+ - `Changes made:` short bullet list.
59
+ - `Validation:` short bullet list with pass, fail, or not run.
60
+ - `Plan update:` one short sentence describing the durable plan change.
61
+ - `Handoff prompt:` a paste-ready prompt that explicitly tells the next session to continue with the next numbered plan step, rendered inside a fenced code block so it appears in a text-copy box.
62
+
63
+ ## Final Response Requirement
64
+ - The last part of every successful run MUST be a next-session handoff prompt rendered in a fenced `text` code block.
65
+ - The handoff prompt MUST use the complete template below, adapted to the specific repository, plan file, module boundary, known current state, validation expectations, and next numbered step.
66
+ - The handoff prompt MUST be actionable on its own, without requiring the next session to infer missing context from prior chat history.
67
+ - When relevant, include confirmed completed prior steps, important file locations, validation commands already known to be required, and any worktree cautions about unrelated generated changes.
68
+ - If blocked, emit the same complete template but rewrite `What to do` so it starts with the smallest safe unblock action instead of full step execution.
69
+
70
+ ## Handoff Prompt Template
71
+ Use this as the default next-session prompt shape and specialize every placeholder:
72
+
73
+ ```text
74
+ Continue the <workstream name> SOLID split in <workspace root> by executing Step <N> from <plan path>: <step goal>.
75
+
76
+ Current state to assume:
77
+ - Step <N-1> is complete.
78
+ - <Previously completed boundary or durable milestone>.
79
+ - The real facade now lives in <current facade path>.
80
+ - The legacy entrypoint <compatibility shim path> is now a compatibility re-export.
81
+ - <Other durable file-location fact that the next step should assume>.
82
+ - <plan path> already marks Step <N-1> as done.
83
+ - Required validations most recently succeeded with:
84
+ - <validation command 1>
85
+ - <validation command 2>
86
+ - The working tree may contain unrelated generated README/doc changes from docs generation or prior refactor work. Do not revert unrelated changes.
87
+
88
+ What to do:
89
+ 1. Read <nearest folder README path> first.
90
+ 2. Read <plan path>.
91
+ 3. Inspect the current surface for this step and its closest related files, especially:
92
+ - <primary file path>
93
+ - <related file path>
94
+ - any nearby consumers/importers or sibling helpers affected by this boundary
95
+ 4. Create and execute the Step <N> split or refactor using the repo's folder-first pattern:
96
+ - <module>/<module>.ts
97
+ - <module>/<module>.types.ts
98
+ - <module>/<module>.utils.ts
99
+ - <module>/<module>.services.ts
100
+ - <module>/<module>.constants.ts
101
+ - add nested subfolders only if clearly justified by existing responsibility seams
102
+ 5. Keep the public API stable. Existing imports of <stable import path> should keep working.
103
+ 6. Make the main facade orchestration-first. Move <responsibility cluster list> behind focused helpers, services, or submodules.
104
+ 7. Improve JSDoc for exported/public surfaces you touch. Do not hand-edit generated README files under generated-doc locations; update source JSDoc instead.
105
+ 8. Update <plan path> to reflect durable Step <N> progress once the step is actually complete.
106
+ 9. Validate with:
107
+ - <validation command 1>
108
+ - <validation command 2>
109
+ 10. Do not run broad test suites unless truly necessary. Preserve unrelated worktree changes.
110
+
111
+ Implementation constraints:
112
+ - Use apply_patch for edits.
113
+ - Keep changes minimal and focused on Step <N>.
114
+ - Do not revert user changes or unrelated generated files.
115
+ - Follow the repo's TypeScript, JSDoc, and style constraints from <instructions path>.
116
+ - Prefer ES2023 style where touched code benefits from it.
117
+ - Keep naming descriptive; avoid short local identifiers.
118
+ - If the target module is too large for a single safe pass, split one helper category at a time but finish the full Step <N> boundary in this session if feasible.
119
+
120
+ Definition of done:
121
+ - <Module or boundary> is no longer the obvious coordination sink.
122
+ - The main facade is thin and orchestration-first.
123
+ - Focused helper files own <responsibility cluster list> responsibilities.
124
+ - Existing consumers still compile without import churn.
125
+ - <plan path> reflects the new durable shape.
126
+ - <validation outcome 1> passes.
127
+ - <validation outcome 2> passes.
128
+
129
+ Final response requirements:
130
+ - Summarize the new <module or boundary> shape.
131
+ - Mention which files became the new public facade and compatibility shim, if any.
132
+ - Report validation results for the required checks.
133
+ - Provide a handoff prompt to perform Step <N+1> in a new session inside a text-copy box. The last step must be to generate the prompt for the next step using this same template.
134
+ ```
135
+
136
+ ## Handoff Rule
137
+ Every successful run must end with a handoff prompt inside a fenced code block, using the complete template above and at minimum preserving this opening sentence shape:
138
+
139
+ ```text
140
+ Continue with <plan path>, starting Step <N>: <step title>. First read the nearest folder README.md files, confirm plan alignment, complete only this step, update the plan when done, validate the touched surface, and stop with the next handoff prompt.
141
+ ```
142
+
143
+ If the run is blocked, end with the same fenced code block shape and the same complete template, but replace the completion request with the smallest safe unblock action.
@@ -15,6 +15,86 @@ When you touch code under `src/` or `test/`, prefer improving JSDoc so the gener
15
15
 
16
16
  Keep examples short, dependency-light, and consistent with the current public API (avoid imaginary helpers or absolute file paths).
17
17
 
18
+ Generated README handling
19
+ ------------------------
20
+ Folder `README.md` files inside `src/` are generated artifacts and should be treated as read-only during normal editing.
21
+
22
+ When a generated `src/**/README.md` is lacking, improve the associated JSDoc in the source files that feed it instead of editing the README directly.
23
+
24
+ When a generated `src/**/README.md` appears outdated relative to the code or JSDoc:
25
+
26
+ - do not hand-edit the generated README,
27
+ - run `npm run docs` to refresh generated documentation when needed,
28
+ - consider agents pre-approved to run `npm run docs` after doc-affecting edits so README files stay synchronized and drift does not confuse later work.
29
+
30
+ Folder README reconnaissance (read this before deep code search)
31
+ ---------------------------------------------------------------
32
+ Because JSDoc is auto-compiled into each folder's `README.md`, those README files are the fastest condensed overview of a module's purpose, exported surface, neighboring files, and intended usage.
33
+
34
+ Before exploring or editing a folder in `src/` or `test/`, agents should:
35
+
36
+ 1. Read the nearest folder `README.md` first.
37
+ - Example: before changing `src/architecture/network/genetic/*`, read `src/architecture/network/genetic/README.md`.
38
+ 2. Read the nearest useful parent README when the task spans multiple sibling areas.
39
+ - Example: pair `src/architecture/network/genetic/README.md` with `src/architecture/network/README.md`.
40
+ 3. Only then read individual source files.
41
+
42
+ Use folder README files to quickly answer:
43
+
44
+ - What is this folder responsible for?
45
+ - Which files are likely orchestration files vs helper/detail files?
46
+ - What public APIs, invariants, or examples are already documented here?
47
+ - Which neighboring modules or tests are probably affected by a change?
48
+ - Whether a code change should also improve JSDoc because the generated README is user-facing.
49
+
50
+ This README-first pass is especially useful for:
51
+
52
+ - fast codebase orientation in unfamiliar folders,
53
+ - choosing the right edit target before opening many files,
54
+ - planning refactors without breaking folder responsibilities,
55
+ - spotting doc/code drift early,
56
+ - finding likely examples and tests for a feature,
57
+ - producing concise explanations for the user after changes.
58
+
59
+ If the folder README appears stale, incomplete, or in tension with the code, treat that as a signal to improve the underlying JSDoc in the touched source files when it is safe to do so.
60
+
61
+ Plan-aware execution (align changes without overloading context)
62
+ ---------------------------------------------------------------
63
+ This repository has an active `plans/` directory with roadmap and design intent. Agents should keep work aligned with those plans, but should avoid loading the entire folder into context unless the task truly requires it.
64
+
65
+ Use this lightweight plan workflow:
66
+
67
+ 1. For any architectural feature, roadmap item, major refactor, export format, or new subsystem work, read `plans/README.md` first as the lightweight plan index.
68
+ 2. Then read `plans/neat.plans.md` when the task touches core NEAT architecture or evolutionary correctness, or otherwise read only the single most relevant plan file from `plans/` for the task at hand.
69
+ 3. If the task touches two clearly related initiatives, read at most one additional plan file.
70
+ 4. Do not bulk-read the whole `plans/` directory by default.
71
+
72
+ When applying a plan:
73
+
74
+ - preserve its terminology and goals unless the user asks to revise the plan,
75
+ - mention any visible mismatch between the codebase and the plan,
76
+ - prefer incremental steps that move the code toward the documented direction,
77
+ - avoid introducing APIs or architecture that conflict with a stated plan without explicitly flagging the conflict.
78
+
79
+ Demo-first library gap policy (critical)
80
+ ---------------------------------------
81
+ Examples and demos in `test/examples/` are not places to normalize library ergonomics gaps. They are probes that should reveal where the public API, defaults, or runtime contracts fall short of world-class expectations.
82
+
83
+ When demo work exposes a mismatch between obvious user intent and the library behavior:
84
+
85
+ - treat the demo as evidence of a library DX gap first,
86
+ - prefer fixing the library, public API, defaults, or shared runtime semantics,
87
+ - use demo-local compensation only when the issue is genuinely demo-specific or a library fix would be unsafe for the current task,
88
+ - if a temporary demo-local workaround is unavoidable, call it out explicitly as technical debt and note the preferred library-level fix.
89
+
90
+ Critical expectation for feed-forward examples:
91
+
92
+ - if a user selects a feed-forward builder or feed-forward mutation policy, agents should assume the expected DX is that feed-forward intent flows through to the runtime without extra demo-specific flags unless the codebase explicitly documents a different contract,
93
+ - when that expectation is not met, agents should frame the issue as a library-level design gap and update plans accordingly.
94
+
95
+ For substantial work, agent prompts and final summaries should briefly note which README and which plan document informed the change.
96
+ After substantial edits, keep summaries short and high level by default, and only expand into detailed walkthroughs when the user asks.
97
+
18
98
  **CRITICAL: Fix-first strategy for test failures**
19
99
  ---------------------------------------------------
20
100
  When asked to fix multiple test failures:
@@ -79,6 +159,44 @@ How to use these instructions
79
159
  - Always prefer to produce code that already satisfies the style guide.
80
160
  - If you cannot fully transform a file (large refactor), return a patch with clear TODO comments, an explicit list of remaining violations, and small, safe automated fixes where possible.
81
161
  - If you propose changes that alter public behavior, include tests and TypeScript typechecks.
162
+ - Default discovery order for non-trivial tasks: relevant folder `README.md` -> parent folder `README.md` if needed -> `plans/README.md` for roadmap alignment when relevant -> the specific source files and the single most relevant detailed plan.
163
+ - Treat generated folder READMEs as compressed context, not as a substitute for code. Use them to reduce search noise, then verify behavior in source.
164
+ - Prefer multiple small, targeted, documented edits over large single-pass rewrites when both approaches can solve the task. This reduces breakage risk and makes generated-doc refreshes easier to verify.
165
+
166
+ Standard architecture for project files
167
+ ---------------------------------------
168
+ When splitting medium or large modules in `src/` or `test/`, prefer a dedicated folder-based module boundary instead of accumulating many sibling files at the parent level.
169
+
170
+ Use this naming convention for a module named `module`:
171
+ - `module/module.ts`
172
+ - `module/module.utils.ts`
173
+ - `module/module.types.ts`
174
+ - `module/module.errors.ts`
175
+ - `module/module.services.ts`
176
+ - `module/module.constants.ts`
177
+
178
+ Use this naming convention for a nested sub-module named `sub-module` inside `module`:
179
+ - `module/sub-module/module.sub-module.ts`
180
+ - `module/sub-module/module.sub-module.utils.ts`
181
+ - `module/sub-module/module.sub-module.types.ts`
182
+ - `module/sub-module/module.sub-module.errors.ts`
183
+ - `module/sub-module/module.sub-module.services.ts`
184
+ - `module/sub-module/module.sub-module.constants.ts`
185
+
186
+ Interpretation rules:
187
+ - `*.ts`: main orchestration and primary public surface for the module.
188
+ - `*.utils.ts`: helper logic that is not the main orchestration path.
189
+ - `*.types.ts`: interfaces, DTOs, context/result objects, and narrow contracts.
190
+ - `*.errors.ts`: module-local error classes and error helpers.
191
+ - `*.services.ts`: side-effecting or stateful services used by orchestration.
192
+ - `*.constants.ts`: named constants, lookup tables, and local config values.
193
+
194
+ Architecture rules:
195
+ - Do not create a folder for every tiny file; use this pattern when a file has become a real subsystem.
196
+ - Keep the main `module/module.ts` file orchestration-first and declarative.
197
+ - Prefer subfolders over continued file sprawl when a module develops a clear internal subsystem.
198
+ - Avoid one-off naming patterns during refactors; once a module is folderized, keep all follow-up files in the same naming scheme.
199
+ - Replace broad catch-all files with narrower module-owned `*.types.ts`, `*.services.ts`, or `*.utils.ts` files rather than recreating another hub.
82
200
 
83
201
  Strict rules to enforce (apply to any suggestion touching `src/` or `test/`)
84
202
  ---------------------------------------------------------------------
@@ -122,6 +240,7 @@ Strict rules to enforce (apply to any suggestion touching `src/` or `test/`)
122
240
  3) Introduce typed context/result objects to reduce parameter sprawl
123
241
  4) Simplify top-level flow to orchestration only
124
242
  5) Fold repeated logic into collect/transform/fold helpers
243
+ - All new complex methods should follow a declarative above-the-fold structure: keep the exported or top-level method as step-oriented orchestration, and place the actual logic in small SRP private helpers below the fold.
125
244
  - Keep the top-level method declarative and linear, with numbered inline comments (`Step 1`, `Step 2`, ...).
126
245
  - Ensure each helper has one reason to change (SRP), very low cognitive complexity, and descriptive naming.
127
246
  - Place helper declarations after the top-level return/fold where language/style allows.
@@ -0,0 +1,220 @@
1
+ ---
2
+ name: solid-split-playbook
3
+ description: 'Plan and execute repo-consistent SOLID splits in NeatapticTS across src/ or test/, starting from a user-specified root such as #file:flappy_bird. Use when folderizing a module, thinning a compatibility facade, improving JSDoc so generated README files read naturally, or continuing an incremental split pass with stable imports.'
4
+ argument-hint: 'Describe the split root, target module or folder, any relevant plan file, and optional detail about the next boundary to extract.'
5
+ user-invocable: true
6
+ disable-model-invocation: false
7
+ ---
8
+
9
+ # Solid Split Playbook
10
+
11
+ Use this skill to run the NeatapticTS house style for deliberate, resumable,
12
+ documentation-aware SOLID splits in either library code under `src/` or demos
13
+ and examples under `test/`.
14
+
15
+ This skill is designed to complement the existing `solid-split` custom agent.
16
+ The skill defines the repository-specific split protocol, documentation bar,
17
+ plan expectations, and validation checklist that should remain consistent across
18
+ split sessions.
19
+
20
+ ## When to Use
21
+
22
+ - The user wants a SOLID split, folderization pass, or orchestration-first
23
+ cleanup from a specific root such as `#file:flappy_bird`.
24
+ - A top-level file is acting as a coordination sink and should become a thin
25
+ compatibility facade or stable public entrypoint.
26
+ - A module boundary needs to be mapped before extracting `*.services.ts`,
27
+ `*.utils.ts`, `*.types.ts`, `*.errors.ts`, or `*.constants.ts` helpers.
28
+ - Generated folder README output looks stale, thin, or not educational enough
29
+ after a refactor.
30
+ - A multi-session split needs a durable plan, strict step sequencing, and a
31
+ high-quality handoff prompt for the next session.
32
+
33
+ ## Invocation Pattern
34
+
35
+ Typical use:
36
+
37
+ ```text
38
+ /solid-split
39
+ SOLID split #file:flappy_bird
40
+ ```
41
+
42
+ Useful optional detail to include:
43
+
44
+ - the root from which to start splitting,
45
+ - the current file or boundary believed to be overloaded,
46
+ - the plan file to follow if one already exists,
47
+ - whether this session should map boundaries, create the plan, or complete one
48
+ specific split step.
49
+
50
+ ## Primary Resources
51
+
52
+ - [Split workflow checklist](./assets/split-workflow-checklist.md)
53
+ - [Split plan template](./assets/split-plan-template.md)
54
+ - [Documentation improvement checklist](./assets/docs-checklist.md)
55
+ - Existing split execution agent: `solid-split`
56
+
57
+ ## Repo Discovery Order
58
+
59
+ For any non-trivial split, follow this order before editing:
60
+
61
+ 1. Build a full README inventory for the requested root, including nested
62
+ subfolder `README.md` files that shape the documentation surface.
63
+ 2. Convert that README inventory into an explicit todo list so the session can
64
+ proceed folder by folder with visible scope.
65
+ 3. Read the nearest folder `README.md` for the target root.
66
+ 4. Read the nearest useful parent `README.md` if the split spans sibling
67
+ surfaces.
68
+ 5. Read `plans/README.md`.
69
+ 6. Read only the single most relevant detailed plan, plus at most one adjacent
70
+ plan if the split clearly spans two initiatives.
71
+ 7. Then inspect the smallest set of source files needed to confirm the actual
72
+ seams.
73
+
74
+ Generated folder README files are reconnaissance artifacts. Do not hand-edit
75
+ them. Use them to infer responsibility boundaries, missing docs, stale public
76
+ surface descriptions, likely neighboring consumers, and where source JSDoc must
77
+ improve.
78
+
79
+ For documentation-heavy passes over a root such as `#file:flappy_bird`, the
80
+ README inventory is mandatory. Do not start editing source until the full set of
81
+ README-owning folders is visible in the todo list.
82
+
83
+ ## Split Philosophy
84
+
85
+ The project prefers small, durable, orchestration-first refactors over large
86
+ one-pass rewrites.
87
+
88
+ - Keep stable public import paths working unless the user explicitly approves a
89
+ breaking change.
90
+ - Reduce the old top-level file to a compatibility facade or public orchestration
91
+ surface when stable imports matter.
92
+ - Move one responsibility cluster at a time into focused helpers or subfolders.
93
+ - Prefer folder-based boundaries when a file has become a real subsystem.
94
+ - Keep top-level flows declarative: collect, transform, fold, return.
95
+ - Use descriptive names and ES2023-first style where the touched code benefits.
96
+
97
+ For demos under `test/examples/`, treat DX gaps as library/runtime evidence
98
+ first. Do not normalize demo-specific workarounds if the real issue is a shared
99
+ API, default, or runtime contract.
100
+
101
+ ## Required Split Workflow
102
+
103
+ 1. Confirm the split root and whether the user wants planning, execution, or
104
+ continuation of an existing pass.
105
+ 2. Build a full inventory of every `README.md` under that root.
106
+ 3. Convert the inventory into a todo list that names each README-owning folder.
107
+ 4. Read the README files in that inventory before deep code search, starting at
108
+ the root and then proceeding folder by folder.
109
+ 5. Read `plans/README.md`, then the single most relevant plan file when the work
110
+ is architectural or part of an ongoing roadmap stream.
111
+ 6. If the split spans an unfamiliar area, use the existing `Boundary Mapper`,
112
+ `Plan Scout`, or `Docs Scout` agents as needed.
113
+ 7. If no durable plan exists, create one using the bundled template.
114
+ 8. Keep the README todo explicit and folder-focused, with exactly one active
115
+ README or folder documentation item at a time.
116
+ 9. Execute only one durable step unless the user explicitly asks for more.
117
+ 10. Improve JSDoc on touched exported and public surfaces so generated README
118
+ output remains educational, example-driven, and conceptually clear.
119
+ 11. Run the minimum validation needed for touched files and the step's done
120
+ criteria.
121
+ 12. Update the plan immediately after the step completes.
122
+ 13. End with a next-session handoff prompt that can continue from the next step
123
+ without depending on prior chat history.
124
+
125
+ ## Documentation Standards
126
+
127
+ This repository is a public-facing educational library. Splits must improve the
128
+ generated documentation story, not only the file structure.
129
+
130
+ When touching exported or public surfaces:
131
+
132
+ - Add or improve JSDoc so the generated README reads naturally.
133
+ - Include concise “what/why” explanations, not only type signatures.
134
+ - Add short `@example` blocks when behavior or intended usage is not obvious.
135
+ - Mention invariants, defaults, performance costs, or error semantics when they
136
+ materially affect downstream users.
137
+ - When the topic is conceptually important, suggest useful background reading in
138
+ plain prose inside the JSDoc description, for example a Wikipedia article on
139
+ a concept such as parallax, graph theory, dynamic programming, or NEAT.
140
+ - Keep examples short, dependency-light, and aligned with the actual public API.
141
+
142
+ Use the generated README as a doc gap detector:
143
+
144
+ - If the README sounds too terse, improve source JSDoc.
145
+ - If neighboring modules are undocumented in the README, consider whether the
146
+ touched source needs clearer exported comments.
147
+ - If a new subfolder is introduced, run `npm run docs` after doc-affecting edits
148
+ so the generated README surface stays synchronized.
149
+ - During large documentation passes, work through the README inventory one todo
150
+ item at a time instead of jumping between folders opportunistically.
151
+
152
+ ## Naming and File-Shape Rules
153
+
154
+ Use the repo's standard architecture pattern where it fits the boundary:
155
+
156
+ - `module/module.ts`
157
+ - `module/module.utils.ts`
158
+ - `module/module.types.ts`
159
+ - `module/module.errors.ts`
160
+ - `module/module.services.ts`
161
+ - `module/module.constants.ts`
162
+
163
+ For nested boundaries:
164
+
165
+ - `module/sub-module/module.sub-module.ts`
166
+ - `module/sub-module/module.sub-module.utils.ts`
167
+ - `module/sub-module/module.sub-module.types.ts`
168
+ - `module/sub-module/module.sub-module.errors.ts`
169
+ - `module/sub-module/module.sub-module.services.ts`
170
+ - `module/sub-module/module.sub-module.constants.ts`
171
+
172
+ Interpretation rules:
173
+
174
+ - `*.ts`: public surface or orchestration-first entrypoint.
175
+ - `*.utils.ts`: pure or narrow helper logic.
176
+ - `*.services.ts`: stateful, coordinating, or side-effecting helpers.
177
+ - `*.types.ts`: typed contracts and context/result objects.
178
+ - `*.errors.ts`: local error classes and error helpers.
179
+ - `*.constants.ts`: named constants and local lookup tables.
180
+
181
+ ## Validation Rules
182
+
183
+ After a split step, run only the minimum validation needed for the touched
184
+ surface and the plan step done criteria.
185
+
186
+ Typical options:
187
+
188
+ - file-level diagnostics for touched files,
189
+ - focused Jest tests for the changed surface,
190
+ - `npx tsc --noEmit -p tsconfig.json` or `tsconfig.test.json` when the step is
191
+ type-heavy,
192
+ - `npm run docs` after doc-affecting changes,
193
+ - targeted build validation when the split changes bundling or runtime entry
194
+ behavior.
195
+
196
+ Do not run broad test suites unless they are truly needed for the current step.
197
+
198
+ ## Guardrails
199
+
200
+ - Do not hand-edit generated README files.
201
+ - Do not revert unrelated user or generated changes.
202
+ - Do not complete multiple durable plan steps in one invocation unless the user
203
+ explicitly asks.
204
+ - Do not break stable import paths when a facade or compatibility shim is
205
+ appropriate.
206
+ - Do not leave a plan stale after reshaping a step.
207
+ - Do not treat examples as the final place to hide library ergonomics gaps.
208
+ - Do not lower the documentation bar during refactors; public-facing docs should
209
+ get better as boundaries improve.
210
+
211
+ ## Expected Final Output
212
+
213
+ The final response for a split step should include:
214
+
215
+ - the plan file used or created,
216
+ - the completed step label,
217
+ - a short summary of the new boundary shape,
218
+ - validation results,
219
+ - the durable plan update,
220
+ - a fenced `text` handoff prompt for the next step.
@@ -0,0 +1,34 @@
1
+ # Documentation Checklist For Splits
2
+
3
+ Use this checklist whenever a split touches exported or public code.
4
+
5
+ ## Required
6
+
7
+ - Every touched exported function, class, type, and shared constant has JSDoc.
8
+ - JSDoc explains what the API does and why the boundary exists.
9
+ - Parameters and returns are documented.
10
+ - Non-obvious semantics include a short example.
11
+ - Important invariants, defaults, error cases, or performance notes are called
12
+ out.
13
+
14
+ ## README-Aware Review
15
+
16
+ Ask these questions while looking at the generated folder README:
17
+
18
+ 1. Would a first-time reader understand the purpose of the new subfolder?
19
+ 2. Does the public facade description explain why it still exists?
20
+ 3. Are helper files described in a way that sounds educational rather than
21
+ merely mechanical?
22
+ 4. Are any exported constants under-documented in the README because their
23
+ source JSDoc is too terse?
24
+ 5. Does the README make the module feel easier to explore after the split?
25
+
26
+ ## Educational Quality Bar
27
+
28
+ - Prefer short conceptual descriptions over bare type restatement.
29
+ - Use brief examples that match the current public API.
30
+ - When the concept is central to understanding the design, mention useful
31
+ external reading in prose, such as a relevant Wikipedia article.
32
+ - Keep examples and explanations dependency-light so they survive doc
33
+ generation cleanly.
34
+ - Avoid filler comments that say only what the code already states.