jfl 0.4.3 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (428) hide show
  1. package/README.md +15 -5
  2. package/dist/commands/context-hub.d.ts.map +1 -1
  3. package/dist/commands/context-hub.js +818 -39
  4. package/dist/commands/context-hub.js.map +1 -1
  5. package/dist/commands/eval.d.ts +1 -1
  6. package/dist/commands/eval.d.ts.map +1 -1
  7. package/dist/commands/eval.js +192 -1
  8. package/dist/commands/eval.js.map +1 -1
  9. package/dist/commands/findings.d.ts +6 -0
  10. package/dist/commands/findings.d.ts.map +1 -0
  11. package/dist/commands/findings.js +203 -0
  12. package/dist/commands/findings.js.map +1 -0
  13. package/dist/commands/hud.d.ts.map +1 -1
  14. package/dist/commands/hud.js +47 -9
  15. package/dist/commands/hud.js.map +1 -1
  16. package/dist/commands/ide.d.ts +27 -0
  17. package/dist/commands/ide.d.ts.map +1 -0
  18. package/dist/commands/ide.js +546 -0
  19. package/dist/commands/ide.js.map +1 -0
  20. package/dist/commands/onboard.d.ts.map +1 -1
  21. package/dist/commands/onboard.js +212 -2
  22. package/dist/commands/onboard.js.map +1 -1
  23. package/dist/commands/openclaw.d.ts +3 -0
  24. package/dist/commands/openclaw.d.ts.map +1 -1
  25. package/dist/commands/openclaw.js +76 -2
  26. package/dist/commands/openclaw.js.map +1 -1
  27. package/dist/commands/peter.d.ts +3 -0
  28. package/dist/commands/peter.d.ts.map +1 -1
  29. package/dist/commands/peter.js +1218 -2
  30. package/dist/commands/peter.js.map +1 -1
  31. package/dist/commands/pi-fleet.d.ts +18 -0
  32. package/dist/commands/pi-fleet.d.ts.map +1 -0
  33. package/dist/commands/pi-fleet.js +382 -0
  34. package/dist/commands/pi-fleet.js.map +1 -0
  35. package/dist/commands/pi.d.ts.map +1 -1
  36. package/dist/commands/pi.js +18 -3
  37. package/dist/commands/pi.js.map +1 -1
  38. package/dist/commands/scope.d.ts.map +1 -1
  39. package/dist/commands/scope.js +90 -1
  40. package/dist/commands/scope.js.map +1 -1
  41. package/dist/commands/services.d.ts.map +1 -1
  42. package/dist/commands/services.js +18 -0
  43. package/dist/commands/services.js.map +1 -1
  44. package/dist/commands/status.d.ts.map +1 -1
  45. package/dist/commands/status.js +22 -4
  46. package/dist/commands/status.js.map +1 -1
  47. package/dist/commands/viz.d.ts.map +1 -1
  48. package/dist/commands/viz.js +417 -0
  49. package/dist/commands/viz.js.map +1 -1
  50. package/dist/dashboard-static/assets/index-B6b867Pv.js +121 -0
  51. package/dist/dashboard-static/assets/index-Y4BrqxV-.css +1 -0
  52. package/dist/dashboard-static/index.html +2 -2
  53. package/dist/index.js +228 -62
  54. package/dist/index.js.map +1 -1
  55. package/dist/lib/agent-config.d.ts +52 -0
  56. package/dist/lib/agent-config.d.ts.map +1 -0
  57. package/dist/lib/agent-config.js +231 -0
  58. package/dist/lib/agent-config.js.map +1 -0
  59. package/dist/lib/agent-generator.d.ts +10 -0
  60. package/dist/lib/agent-generator.d.ts.map +1 -1
  61. package/dist/lib/agent-generator.js +64 -10
  62. package/dist/lib/agent-generator.js.map +1 -1
  63. package/dist/lib/agent-session.d.ts +104 -0
  64. package/dist/lib/agent-session.d.ts.map +1 -0
  65. package/dist/lib/agent-session.js +627 -0
  66. package/dist/lib/agent-session.js.map +1 -0
  67. package/dist/lib/eval-snapshot.d.ts +47 -0
  68. package/dist/lib/eval-snapshot.d.ts.map +1 -0
  69. package/dist/lib/eval-snapshot.js +315 -0
  70. package/dist/lib/eval-snapshot.js.map +1 -0
  71. package/dist/lib/eval-store.d.ts +5 -0
  72. package/dist/lib/eval-store.d.ts.map +1 -1
  73. package/dist/lib/eval-store.js +33 -3
  74. package/dist/lib/eval-store.js.map +1 -1
  75. package/dist/lib/findings-engine.d.ts +51 -0
  76. package/dist/lib/findings-engine.d.ts.map +1 -0
  77. package/dist/lib/findings-engine.js +338 -0
  78. package/dist/lib/findings-engine.js.map +1 -0
  79. package/dist/lib/flow-engine.d.ts +8 -0
  80. package/dist/lib/flow-engine.d.ts.map +1 -1
  81. package/dist/lib/flow-engine.js +84 -2
  82. package/dist/lib/flow-engine.js.map +1 -1
  83. package/dist/lib/hub-client.d.ts +1 -0
  84. package/dist/lib/hub-client.d.ts.map +1 -1
  85. package/dist/lib/hub-client.js +33 -6
  86. package/dist/lib/hub-client.js.map +1 -1
  87. package/dist/lib/ide-panes.d.ts +58 -0
  88. package/dist/lib/ide-panes.d.ts.map +1 -0
  89. package/dist/lib/ide-panes.js +508 -0
  90. package/dist/lib/ide-panes.js.map +1 -0
  91. package/dist/lib/memory-db.js +4 -4
  92. package/dist/lib/memory-db.js.map +1 -1
  93. package/dist/lib/memory-indexer.d.ts.map +1 -1
  94. package/dist/lib/memory-indexer.js +3 -0
  95. package/dist/lib/memory-indexer.js.map +1 -1
  96. package/dist/lib/memory-search.d.ts +148 -4
  97. package/dist/lib/memory-search.d.ts.map +1 -1
  98. package/dist/lib/memory-search.js +496 -58
  99. package/dist/lib/memory-search.js.map +1 -1
  100. package/dist/lib/meta-orchestrator.d.ts +104 -0
  101. package/dist/lib/meta-orchestrator.d.ts.map +1 -0
  102. package/dist/lib/meta-orchestrator.js +373 -0
  103. package/dist/lib/meta-orchestrator.js.map +1 -0
  104. package/dist/lib/peer-agent-generator.d.ts.map +1 -1
  105. package/dist/lib/peer-agent-generator.js +43 -19
  106. package/dist/lib/peer-agent-generator.js.map +1 -1
  107. package/dist/lib/policy-head.d.ts +25 -0
  108. package/dist/lib/policy-head.d.ts.map +1 -0
  109. package/dist/lib/policy-head.js +136 -0
  110. package/dist/lib/policy-head.js.map +1 -0
  111. package/dist/lib/replay-buffer.d.ts +93 -0
  112. package/dist/lib/replay-buffer.d.ts.map +1 -0
  113. package/dist/lib/replay-buffer.js +302 -0
  114. package/dist/lib/replay-buffer.js.map +1 -0
  115. package/dist/lib/sentinel-rl.d.ts +97 -0
  116. package/dist/lib/sentinel-rl.d.ts.map +1 -0
  117. package/dist/lib/sentinel-rl.js +430 -0
  118. package/dist/lib/sentinel-rl.js.map +1 -0
  119. package/dist/lib/session-lock.d.ts +61 -0
  120. package/dist/lib/session-lock.d.ts.map +1 -0
  121. package/dist/lib/session-lock.js +438 -0
  122. package/dist/lib/session-lock.js.map +1 -0
  123. package/dist/lib/stratus-client.d.ts +1 -0
  124. package/dist/lib/stratus-client.d.ts.map +1 -1
  125. package/dist/lib/stratus-client.js +24 -2
  126. package/dist/lib/stratus-client.js.map +1 -1
  127. package/dist/lib/telemetry-agent-v2.d.ts +128 -0
  128. package/dist/lib/telemetry-agent-v2.d.ts.map +1 -0
  129. package/dist/lib/telemetry-agent-v2.js +1042 -0
  130. package/dist/lib/telemetry-agent-v2.js.map +1 -0
  131. package/dist/lib/telemetry-agent.d.ts.map +1 -1
  132. package/dist/lib/telemetry-agent.js +27 -6
  133. package/dist/lib/telemetry-agent.js.map +1 -1
  134. package/dist/lib/telemetry-digest.d.ts.map +1 -1
  135. package/dist/lib/telemetry-digest.js +27 -5
  136. package/dist/lib/telemetry-digest.js.map +1 -1
  137. package/dist/lib/telemetry.d.ts.map +1 -1
  138. package/dist/lib/telemetry.js +29 -4
  139. package/dist/lib/telemetry.js.map +1 -1
  140. package/dist/lib/text-preprocessing.d.ts +83 -0
  141. package/dist/lib/text-preprocessing.d.ts.map +1 -0
  142. package/dist/lib/text-preprocessing.js +261 -0
  143. package/dist/lib/text-preprocessing.js.map +1 -0
  144. package/dist/lib/training-buffer.d.ts +86 -0
  145. package/dist/lib/training-buffer.d.ts.map +1 -0
  146. package/dist/lib/training-buffer.js +139 -0
  147. package/dist/lib/training-buffer.js.map +1 -0
  148. package/dist/lib/tuple-miner.d.ts +30 -0
  149. package/dist/lib/tuple-miner.d.ts.map +1 -0
  150. package/dist/lib/tuple-miner.js +427 -0
  151. package/dist/lib/tuple-miner.js.map +1 -0
  152. package/dist/lib/vm-backend.d.ts +72 -0
  153. package/dist/lib/vm-backend.d.ts.map +1 -0
  154. package/dist/lib/vm-backend.js +175 -0
  155. package/dist/lib/vm-backend.js.map +1 -0
  156. package/dist/lib/workspace/backend.d.ts +53 -0
  157. package/dist/lib/workspace/backend.d.ts.map +1 -0
  158. package/dist/lib/workspace/backend.js +37 -0
  159. package/dist/lib/workspace/backend.js.map +1 -0
  160. package/dist/lib/workspace/cmux-adapter.d.ts +46 -0
  161. package/dist/lib/workspace/cmux-adapter.d.ts.map +1 -0
  162. package/dist/lib/workspace/cmux-adapter.js +261 -0
  163. package/dist/lib/workspace/cmux-adapter.js.map +1 -0
  164. package/dist/lib/workspace/data-pipeline.d.ts +35 -0
  165. package/dist/lib/workspace/data-pipeline.d.ts.map +1 -0
  166. package/dist/lib/workspace/data-pipeline.js +463 -0
  167. package/dist/lib/workspace/data-pipeline.js.map +1 -0
  168. package/dist/lib/workspace/engine.d.ts +64 -0
  169. package/dist/lib/workspace/engine.d.ts.map +1 -0
  170. package/dist/lib/workspace/engine.js +397 -0
  171. package/dist/lib/workspace/engine.js.map +1 -0
  172. package/dist/lib/workspace/notifications.d.ts +14 -0
  173. package/dist/lib/workspace/notifications.d.ts.map +1 -0
  174. package/dist/lib/workspace/notifications.js +41 -0
  175. package/dist/lib/workspace/notifications.js.map +1 -0
  176. package/dist/lib/workspace/surface-registry.d.ts +49 -0
  177. package/dist/lib/workspace/surface-registry.d.ts.map +1 -0
  178. package/dist/lib/workspace/surface-registry.js +217 -0
  179. package/dist/lib/workspace/surface-registry.js.map +1 -0
  180. package/dist/lib/workspace/surface-type.d.ts +153 -0
  181. package/dist/lib/workspace/surface-type.d.ts.map +1 -0
  182. package/dist/lib/workspace/surface-type.js +9 -0
  183. package/dist/lib/workspace/surface-type.js.map +1 -0
  184. package/dist/lib/workspace/surfaces/agent-overview.d.ts +16 -0
  185. package/dist/lib/workspace/surfaces/agent-overview.d.ts.map +1 -0
  186. package/dist/lib/workspace/surfaces/agent-overview.js +116 -0
  187. package/dist/lib/workspace/surfaces/agent-overview.js.map +1 -0
  188. package/dist/lib/workspace/surfaces/agent.d.ts +16 -0
  189. package/dist/lib/workspace/surfaces/agent.d.ts.map +1 -0
  190. package/dist/lib/workspace/surfaces/agent.js +112 -0
  191. package/dist/lib/workspace/surfaces/agent.js.map +1 -0
  192. package/dist/lib/workspace/surfaces/claude.d.ts +15 -0
  193. package/dist/lib/workspace/surfaces/claude.d.ts.map +1 -0
  194. package/dist/lib/workspace/surfaces/claude.js +23 -0
  195. package/dist/lib/workspace/surfaces/claude.js.map +1 -0
  196. package/dist/lib/workspace/surfaces/dashboard.d.ts +21 -0
  197. package/dist/lib/workspace/surfaces/dashboard.d.ts.map +1 -0
  198. package/dist/lib/workspace/surfaces/dashboard.js +32 -0
  199. package/dist/lib/workspace/surfaces/dashboard.js.map +1 -0
  200. package/dist/lib/workspace/surfaces/eval.d.ts +15 -0
  201. package/dist/lib/workspace/surfaces/eval.d.ts.map +1 -0
  202. package/dist/lib/workspace/surfaces/eval.js +42 -0
  203. package/dist/lib/workspace/surfaces/eval.js.map +1 -0
  204. package/dist/lib/workspace/surfaces/event-stream.d.ts +16 -0
  205. package/dist/lib/workspace/surfaces/event-stream.d.ts.map +1 -0
  206. package/dist/lib/workspace/surfaces/event-stream.js +40 -0
  207. package/dist/lib/workspace/surfaces/event-stream.js.map +1 -0
  208. package/dist/lib/workspace/surfaces/flow.d.ts +16 -0
  209. package/dist/lib/workspace/surfaces/flow.d.ts.map +1 -0
  210. package/dist/lib/workspace/surfaces/flow.js +49 -0
  211. package/dist/lib/workspace/surfaces/flow.js.map +1 -0
  212. package/dist/lib/workspace/surfaces/index.d.ts +16 -0
  213. package/dist/lib/workspace/surfaces/index.d.ts.map +1 -0
  214. package/dist/lib/workspace/surfaces/index.js +16 -0
  215. package/dist/lib/workspace/surfaces/index.js.map +1 -0
  216. package/dist/lib/workspace/surfaces/portfolio.d.ts +16 -0
  217. package/dist/lib/workspace/surfaces/portfolio.d.ts.map +1 -0
  218. package/dist/lib/workspace/surfaces/portfolio.js +102 -0
  219. package/dist/lib/workspace/surfaces/portfolio.js.map +1 -0
  220. package/dist/lib/workspace/surfaces/service.d.ts +16 -0
  221. package/dist/lib/workspace/surfaces/service.d.ts.map +1 -0
  222. package/dist/lib/workspace/surfaces/service.js +45 -0
  223. package/dist/lib/workspace/surfaces/service.js.map +1 -0
  224. package/dist/lib/workspace/surfaces/shell.d.ts +15 -0
  225. package/dist/lib/workspace/surfaces/shell.d.ts.map +1 -0
  226. package/dist/lib/workspace/surfaces/shell.js +19 -0
  227. package/dist/lib/workspace/surfaces/shell.js.map +1 -0
  228. package/dist/lib/workspace/surfaces/telemetry.d.ts +16 -0
  229. package/dist/lib/workspace/surfaces/telemetry.d.ts.map +1 -0
  230. package/dist/lib/workspace/surfaces/telemetry.js +48 -0
  231. package/dist/lib/workspace/surfaces/telemetry.js.map +1 -0
  232. package/dist/lib/workspace/surfaces/topology.d.ts +15 -0
  233. package/dist/lib/workspace/surfaces/topology.d.ts.map +1 -0
  234. package/dist/lib/workspace/surfaces/topology.js +19 -0
  235. package/dist/lib/workspace/surfaces/topology.js.map +1 -0
  236. package/dist/lib/workspace/surfaces/training.d.ts +16 -0
  237. package/dist/lib/workspace/surfaces/training.d.ts.map +1 -0
  238. package/dist/lib/workspace/surfaces/training.js +22 -0
  239. package/dist/lib/workspace/surfaces/training.js.map +1 -0
  240. package/dist/lib/workspace/tmux-adapter.d.ts +27 -0
  241. package/dist/lib/workspace/tmux-adapter.d.ts.map +1 -0
  242. package/dist/lib/workspace/tmux-adapter.js +106 -0
  243. package/dist/lib/workspace/tmux-adapter.js.map +1 -0
  244. package/dist/mcp/context-hub-mcp.js +7 -24
  245. package/dist/mcp/context-hub-mcp.js.map +1 -1
  246. package/dist/types/flows.d.ts +2 -0
  247. package/dist/types/flows.d.ts.map +1 -1
  248. package/dist/types/ide.d.ts +49 -0
  249. package/dist/types/ide.d.ts.map +1 -0
  250. package/dist/types/ide.js +5 -0
  251. package/dist/types/ide.js.map +1 -0
  252. package/dist/types/platform-digest.d.ts +228 -0
  253. package/dist/types/platform-digest.d.ts.map +1 -0
  254. package/dist/types/platform-digest.js +5 -0
  255. package/dist/types/platform-digest.js.map +1 -0
  256. package/dist/types/telemetry-digest.d.ts +2 -0
  257. package/dist/types/telemetry-digest.d.ts.map +1 -1
  258. package/dist/utils/ensure-project.d.ts +1 -0
  259. package/dist/utils/ensure-project.d.ts.map +1 -1
  260. package/dist/utils/ensure-project.js +19 -7
  261. package/dist/utils/ensure-project.js.map +1 -1
  262. package/dist/utils/jfl-config.d.ts +1 -0
  263. package/dist/utils/jfl-config.d.ts.map +1 -1
  264. package/dist/utils/jfl-config.js +19 -1
  265. package/dist/utils/jfl-config.js.map +1 -1
  266. package/dist/utils/jfl-paths.d.ts +5 -0
  267. package/dist/utils/jfl-paths.d.ts.map +1 -1
  268. package/dist/utils/jfl-paths.js +25 -3
  269. package/dist/utils/jfl-paths.js.map +1 -1
  270. package/package.json +3 -2
  271. package/packages/pi/AGENTS.md +112 -0
  272. package/packages/pi/extensions/agent-grid.ts +191 -0
  273. package/packages/pi/extensions/agent-names.ts +178 -0
  274. package/packages/pi/extensions/autoresearch.ts +427 -0
  275. package/packages/pi/extensions/bookmarks.ts +85 -0
  276. package/packages/pi/extensions/context.ts +151 -0
  277. package/packages/pi/extensions/crm-tool.ts +61 -0
  278. package/packages/pi/extensions/eval-tool.ts +224 -0
  279. package/packages/pi/extensions/eval.ts +60 -0
  280. package/packages/pi/extensions/footer.ts +239 -0
  281. package/packages/pi/extensions/hud-tool.ts +145 -0
  282. package/packages/pi/extensions/index.ts +392 -0
  283. package/packages/pi/extensions/journal.ts +224 -0
  284. package/packages/pi/extensions/map-bridge.ts +178 -0
  285. package/packages/pi/extensions/memory-tool.ts +68 -0
  286. package/packages/pi/extensions/notifications.ts +73 -0
  287. package/packages/pi/extensions/peter-parker.ts +202 -0
  288. package/packages/pi/extensions/policy-head-tool.ts +276 -0
  289. package/packages/pi/extensions/portfolio-bridge.ts +90 -0
  290. package/packages/pi/extensions/session.ts +90 -0
  291. package/packages/pi/extensions/shortcuts.ts +259 -0
  292. package/packages/pi/extensions/stratus-bridge.ts +115 -0
  293. package/packages/pi/extensions/synopsis-tool.ts +83 -0
  294. package/packages/pi/extensions/tool-renderers.ts +352 -0
  295. package/packages/pi/extensions/training-buffer-tool.ts +368 -0
  296. package/packages/pi/extensions/types.ts +163 -0
  297. package/packages/pi/package-lock.json +346 -0
  298. package/packages/pi/package.json +44 -0
  299. package/packages/pi/skills/agent-browser/SKILL.md +116 -0
  300. package/packages/pi/skills/brand-architect/SKILL.md +240 -0
  301. package/packages/pi/skills/brand-architect/config.yaml +137 -0
  302. package/packages/pi/skills/campaign-hud/config.yaml +112 -0
  303. package/packages/pi/skills/content-creator/SKILL.md +294 -0
  304. package/packages/pi/skills/context/SKILL.md +65 -0
  305. package/packages/pi/skills/debug/MULTI_AGENT.md +360 -0
  306. package/packages/pi/skills/debug/SKILL.md +554 -0
  307. package/packages/pi/skills/end/SKILL.md +1782 -0
  308. package/packages/pi/skills/eval/SKILL.md +75 -0
  309. package/packages/pi/skills/fly-deploy/SKILL.md +676 -0
  310. package/packages/pi/skills/founder-video/SKILL.md +467 -0
  311. package/packages/pi/skills/hud/SKILL.md +160 -0
  312. package/packages/pi/skills/orchestrate/SKILL.md +74 -0
  313. package/packages/pi/skills/pi-agents/SKILL.md +78 -0
  314. package/packages/pi/skills/react-best-practices/AGENTS.md +2249 -0
  315. package/packages/pi/skills/react-best-practices/README.md +123 -0
  316. package/packages/pi/skills/react-best-practices/SKILL.md +125 -0
  317. package/packages/pi/skills/react-best-practices/metadata.json +15 -0
  318. package/packages/pi/skills/react-best-practices/rules/_sections.md +46 -0
  319. package/packages/pi/skills/react-best-practices/rules/_template.md +28 -0
  320. package/packages/pi/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  321. package/packages/pi/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
  322. package/packages/pi/skills/react-best-practices/rules/async-api-routes.md +38 -0
  323. package/packages/pi/skills/react-best-practices/rules/async-defer-await.md +80 -0
  324. package/packages/pi/skills/react-best-practices/rules/async-dependencies.md +36 -0
  325. package/packages/pi/skills/react-best-practices/rules/async-parallel.md +28 -0
  326. package/packages/pi/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  327. package/packages/pi/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  328. package/packages/pi/skills/react-best-practices/rules/bundle-conditional.md +31 -0
  329. package/packages/pi/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  330. package/packages/pi/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  331. package/packages/pi/skills/react-best-practices/rules/bundle-preload.md +50 -0
  332. package/packages/pi/skills/react-best-practices/rules/client-event-listeners.md +74 -0
  333. package/packages/pi/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
  334. package/packages/pi/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
  335. package/packages/pi/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
  336. package/packages/pi/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
  337. package/packages/pi/skills/react-best-practices/rules/js-cache-storage.md +70 -0
  338. package/packages/pi/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
  339. package/packages/pi/skills/react-best-practices/rules/js-early-exit.md +50 -0
  340. package/packages/pi/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
  341. package/packages/pi/skills/react-best-practices/rules/js-index-maps.md +37 -0
  342. package/packages/pi/skills/react-best-practices/rules/js-length-check-first.md +49 -0
  343. package/packages/pi/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
  344. package/packages/pi/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
  345. package/packages/pi/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  346. package/packages/pi/skills/react-best-practices/rules/rendering-activity.md +26 -0
  347. package/packages/pi/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  348. package/packages/pi/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
  349. package/packages/pi/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
  350. package/packages/pi/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  351. package/packages/pi/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  352. package/packages/pi/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
  353. package/packages/pi/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
  354. package/packages/pi/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
  355. package/packages/pi/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
  356. package/packages/pi/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  357. package/packages/pi/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  358. package/packages/pi/skills/react-best-practices/rules/rerender-memo.md +44 -0
  359. package/packages/pi/skills/react-best-practices/rules/rerender-transitions.md +40 -0
  360. package/packages/pi/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
  361. package/packages/pi/skills/react-best-practices/rules/server-cache-lru.md +41 -0
  362. package/packages/pi/skills/react-best-practices/rules/server-cache-react.md +26 -0
  363. package/packages/pi/skills/react-best-practices/rules/server-parallel-fetching.md +79 -0
  364. package/packages/pi/skills/react-best-practices/rules/server-serialization.md +38 -0
  365. package/packages/pi/skills/remotion-best-practices/SKILL.md +43 -0
  366. package/packages/pi/skills/remotion-best-practices/rules/3d.md +86 -0
  367. package/packages/pi/skills/remotion-best-practices/rules/animations.md +29 -0
  368. package/packages/pi/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
  369. package/packages/pi/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
  370. package/packages/pi/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +108 -0
  371. package/packages/pi/skills/remotion-best-practices/rules/assets.md +78 -0
  372. package/packages/pi/skills/remotion-best-practices/rules/audio.md +172 -0
  373. package/packages/pi/skills/remotion-best-practices/rules/calculate-metadata.md +104 -0
  374. package/packages/pi/skills/remotion-best-practices/rules/can-decode.md +75 -0
  375. package/packages/pi/skills/remotion-best-practices/rules/charts.md +58 -0
  376. package/packages/pi/skills/remotion-best-practices/rules/compositions.md +146 -0
  377. package/packages/pi/skills/remotion-best-practices/rules/display-captions.md +126 -0
  378. package/packages/pi/skills/remotion-best-practices/rules/extract-frames.md +229 -0
  379. package/packages/pi/skills/remotion-best-practices/rules/fonts.md +152 -0
  380. package/packages/pi/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
  381. package/packages/pi/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
  382. package/packages/pi/skills/remotion-best-practices/rules/get-video-duration.md +58 -0
  383. package/packages/pi/skills/remotion-best-practices/rules/gifs.md +138 -0
  384. package/packages/pi/skills/remotion-best-practices/rules/images.md +130 -0
  385. package/packages/pi/skills/remotion-best-practices/rules/import-srt-captions.md +67 -0
  386. package/packages/pi/skills/remotion-best-practices/rules/lottie.md +68 -0
  387. package/packages/pi/skills/remotion-best-practices/rules/measuring-dom-nodes.md +35 -0
  388. package/packages/pi/skills/remotion-best-practices/rules/measuring-text.md +143 -0
  389. package/packages/pi/skills/remotion-best-practices/rules/sequencing.md +106 -0
  390. package/packages/pi/skills/remotion-best-practices/rules/tailwind.md +11 -0
  391. package/packages/pi/skills/remotion-best-practices/rules/text-animations.md +20 -0
  392. package/packages/pi/skills/remotion-best-practices/rules/timing.md +179 -0
  393. package/packages/pi/skills/remotion-best-practices/rules/transcribe-captions.md +19 -0
  394. package/packages/pi/skills/remotion-best-practices/rules/transitions.md +122 -0
  395. package/packages/pi/skills/remotion-best-practices/rules/trimming.md +53 -0
  396. package/packages/pi/skills/remotion-best-practices/rules/videos.md +171 -0
  397. package/packages/pi/skills/search/SKILL.md +220 -0
  398. package/packages/pi/skills/spec/SKILL.md +377 -0
  399. package/packages/pi/skills/startup/SKILL.md +315 -0
  400. package/packages/pi/skills/web-architect/SKILL.md +309 -0
  401. package/packages/pi/skills/x-algorithm/SKILL.md +305 -0
  402. package/packages/pi/teams/dev-team.yaml +63 -0
  403. package/packages/pi/teams/gtm-team.yaml +79 -0
  404. package/packages/pi/themes/jfl.theme.json +76 -0
  405. package/packages/pi/tsconfig.json +21 -0
  406. package/scripts/collect-tuples.sh +124 -0
  407. package/scripts/destroy-fleet.sh +37 -0
  408. package/scripts/jfl-ide.sh +48 -0
  409. package/scripts/session/session-cleanup.sh +4 -11
  410. package/scripts/session/session-init.sh +6 -0
  411. package/scripts/session/session-sync.sh +25 -0
  412. package/scripts/setup-branch-protection.sh +106 -0
  413. package/scripts/spawn-fleet.sh +144 -0
  414. package/scripts/train-policy-head.py +434 -0
  415. package/scripts/vm-swarm/README.md +301 -0
  416. package/scripts/vm-swarm/collect-tuples.sh +331 -0
  417. package/scripts/vm-swarm/create-base-template.sh +339 -0
  418. package/scripts/vm-swarm/kill-fleet.sh +204 -0
  419. package/scripts/vm-swarm/monitor-fleet.sh +346 -0
  420. package/scripts/vm-swarm/spawn-fleet.sh +304 -0
  421. package/template/.github/workflows/jfl-eval.yml +105 -8
  422. package/template/.github/workflows/jfl-review.yml +4 -0
  423. package/template/scripts/session/session-end.sh +69 -6
  424. package/template/scripts/session/session-init.sh +55 -30
  425. package/template/scripts/session/session-lock.sh +464 -0
  426. package/template/templates/service-agent/workflows/jfl-eval.yml +19 -0
  427. package/dist/dashboard-static/assets/index-B6kRK9Rq.js +0 -116
  428. package/dist/dashboard-static/assets/index-BpdKJPLu.css +0 -1
package/dist/index.js CHANGED
@@ -12,47 +12,30 @@ import { readFileSync } from "fs";
12
12
  import { join } from "path";
13
13
  import * as path from "path";
14
14
  import { fileURLToPath } from "url";
15
- import { doctorCommand } from "./commands/doctor.js";
16
- import { agentCommand } from "./commands/agent.js";
17
- import { initCommand } from "./commands/init.js";
18
- import { repairCommand } from "./commands/repair.js";
19
- import { validateSettingsCommand } from "./commands/validate-settings.js";
20
- import { loginCommand, logout } from "./commands/login.js";
21
- import { statusCommand } from "./commands/status.js";
22
- import { deployCommand } from "./commands/deploy.js";
23
- import { agentsCommand } from "./commands/agents.js";
24
- import { hudCommand } from "./commands/hud.js";
25
- import { sessionCommand } from "./commands/session.js";
26
- import { feedbackCommand } from "./commands/feedback.js";
27
- import { updateCommand } from "./commands/update.js";
28
- import { contextHubCommand } from "./commands/context-hub.js";
29
- import { hooksCommand } from "./commands/hooks.js";
30
- import { flowsCommand } from "./commands/flows.js";
31
- import { scopeCommand } from "./commands/scope.js";
32
- import { voiceCommand } from "./commands/voice.js";
33
- import { synopsisCommand } from "./commands/synopsis.js";
34
- import { onboardCommand } from "./commands/onboard.js";
35
- import { profileCommand } from "./commands/profile.js";
36
- import { migrateServices } from "./commands/migrate-services.js";
37
- import { memoryInitCommand, memoryStatusCommand, memorySearchCommand, memoryIndexCommand } from "./commands/memory.js";
38
- import { listSkillsCommand, installSkillCommand, removeSkillCommand, updateSkillsCommand, searchSkillsCommand, } from "./commands/skills.js";
39
- import { ralphCommand, showRalphHelp } from "./commands/ralph.js";
40
- import { peterCommand } from "./commands/peter.js";
41
- import { clawdbotSetupCommand, clawdbotStatusCommand } from "./commands/clawdbot.js";
42
- import { showDayPassStatus, hasWallet, getWalletAddress, } from "./utils/auth-guard.js";
43
- import { checkAndMigrate } from "./utils/jfl-migration.js";
15
+ // Lazy imports - only load when needed to reduce startup latency
16
+ // All commands use dynamic import() to defer loading until invoked
44
17
  import { JFL_PATHS } from "./utils/jfl-paths.js";
45
- import { telemetry } from "./lib/telemetry.js";
46
- // Auto-migrate from ~/.jfl/ to XDG directories if needed
47
- await checkAndMigrate({ silent: true });
18
+ // Telemetry loaded lazily on first track() call
19
+ let _telemetry;
20
+ async function getTelemetry() {
21
+ if (!_telemetry) {
22
+ const mod = await import("./lib/telemetry.js");
23
+ _telemetry = mod.telemetry;
24
+ }
25
+ return _telemetry;
26
+ }
27
+ // Migration check runs in background, doesn't block startup
28
+ import("./utils/jfl-migration.js").then(mod => mod.checkAndMigrate({ silent: true })).catch(() => { });
48
29
  const program = new Command();
49
- // Telemetry hooks — auto-track all commands
30
+ // Telemetry hooks — auto-track all commands (lazy load telemetry)
50
31
  program.hook('preAction', (_thisCommand, actionCommand) => {
51
32
  ;
52
33
  actionCommand.__telemetryStart = Date.now();
53
34
  });
54
- program.hook('postAction', (_thisCommand, actionCommand) => {
35
+ program.hook('postAction', async (_thisCommand, actionCommand) => {
55
36
  const start = actionCommand.__telemetryStart;
37
+ // Lazy load telemetry only when actually tracking
38
+ const telemetry = await getTelemetry();
56
39
  telemetry.track({
57
40
  category: 'command',
58
41
  event: `command:${actionCommand.name()}`,
@@ -62,9 +45,9 @@ program.hook('postAction', (_thisCommand, actionCommand) => {
62
45
  });
63
46
  });
64
47
  const HELP_GROUPS = {
65
- "Getting Started": ["init", "status", "hud", "doctor"],
48
+ "Getting Started": ["init", "status", "hud", "ide", "doctor"],
66
49
  "Daily Use": ["synopsis", "ask", "improve", "events", "voice"],
67
- "Management": ["services", "portfolio", "flows", "hooks", "scope", "memory", "eval", "viz", "telemetry", "context-hub", "skills", "ci"],
50
+ "Management": ["services", "portfolio", "flows", "hooks", "scope", "memory", "eval", "findings", "viz", "telemetry", "context-hub", "skills", "ci"],
68
51
  "Platform": ["login", "deploy", "wallet", "preferences"],
69
52
  "Advanced": ["peter", "orchestrate", "openclaw", "ralph", "agent"],
70
53
  };
@@ -158,9 +141,11 @@ program
158
141
  .action(async (options) => {
159
142
  // Always update on session start (unless --no-update flag)
160
143
  if (options.update !== false) {
144
+ const { updateCommand } = await import("./commands/update.js");
161
145
  await updateCommand({ autoUpdate: true });
162
146
  console.log(); // Add spacing before session starts
163
147
  }
148
+ const { sessionCommand } = await import("./commands/session.js");
164
149
  await sessionCommand({});
165
150
  });
166
151
  // ============================================================================
@@ -170,26 +155,55 @@ program
170
155
  .command("init")
171
156
  .description("Initialize a new JFL project")
172
157
  .option("-n, --name <name>", "Project name")
173
- .action(initCommand);
158
+ .action(async (options) => {
159
+ const { initCommand } = await import("./commands/init.js");
160
+ await initCommand(options);
161
+ });
174
162
  program
175
163
  .command("repair")
176
164
  .description("Repair a JFL project missing .jfl directory")
177
- .action(repairCommand);
165
+ .action(async () => {
166
+ const { repairCommand } = await import("./commands/repair.js");
167
+ await repairCommand();
168
+ });
178
169
  program
179
170
  .command("validate-settings")
180
171
  .description("Validate and repair .claude/settings.json")
181
172
  .option("--fix", "Attempt to auto-repair common issues")
182
173
  .option("--json", "Output in JSON format")
183
- .action(validateSettingsCommand);
174
+ .action(async (options) => {
175
+ const { validateSettingsCommand } = await import("./commands/validate-settings.js");
176
+ await validateSettingsCommand(options);
177
+ });
184
178
  program
185
179
  .command("hud")
186
180
  .description("Show campaign dashboard")
187
181
  .option("-c, --compact", "Show compact one-line status")
188
- .action(hudCommand);
182
+ .action(async (options) => {
183
+ const { hudCommand } = await import("./commands/hud.js");
184
+ await hudCommand(options);
185
+ });
189
186
  program
190
187
  .command("status")
191
188
  .description("Show project status")
192
- .action(statusCommand);
189
+ .action(async () => {
190
+ const { statusCommand } = await import("./commands/status.js");
191
+ await statusCommand();
192
+ });
193
+ // IDE workspace command — uses dynamic imports to avoid linter stripping
194
+ const ide = program.command("ide").description("Terminal workspace — cmux/tmux with live sidebar data and notifications");
195
+ ide.command("launch", { isDefault: true }).description("Launch workspace (default)").option("--json", "Output as JSON").action(async (options) => { const m = await import("./commands/ide.js"); await m.ideLaunchCommand(options); });
196
+ ide.command("add").description("Add a surface to the workspace").argument("[name]", "Surface name (agent, built-in type, or service)").option("--row <n>", "Row index (0-based)").option("--position <n>", "Position within row (0-based)").option("--title <title>", "Custom surface title").option("--cmd <command>", "Custom surface command").action(async (name, options) => { const m = await import("./commands/ide.js"); await m.ideAddCommand(name, options); });
197
+ ide.command("remove").description("Remove a surface from the workspace").argument("<name>", "Surface name or title to remove").action(async (name) => { const m = await import("./commands/ide.js"); await m.ideRemoveCommand(name); });
198
+ ide.command("available").description("List available surface types, agents, and services").action(async () => { const m = await import("./commands/ide.js"); await m.ideAvailableCommand(); });
199
+ ide.command("status").description("Show current workspace layout and session state").option("--json", "Output as JSON").action(async (options) => { const m = await import("./commands/ide.js"); await m.ideStatusCommand(options); });
200
+ ide.command("surfaces").description("List active surfaces with live sidebar data").option("--json", "Output as JSON").action(async (options) => { const m = await import("./commands/ide.js"); await m.ideSurfacesCommand(options); });
201
+ ide.command("stop").description("Stop the running workspace session").action(async () => { const m = await import("./commands/ide.js"); await m.ideStopCommand(); });
202
+ ide.command("restart").description("Restart the workspace session").action(async () => { const m = await import("./commands/ide.js"); await m.ideRestartCommand(); });
203
+ ide.command("reset").description("Reset workspace to welcome state").action(async () => { const m = await import("./commands/ide.js"); await m.ideResetCommand(); });
204
+ ide.command("open").description("Open a child project/service in the workspace").argument("<name>", "Service or product name to open").action(async (name) => { const m = await import("./commands/ide.js"); await m.ideOpenCommand(name); });
205
+ ide.command("up").description("Navigate to parent project (portfolio or GTM)").action(async () => { const m = await import("./commands/ide.js"); await m.ideUpCommand(); });
206
+ ide.command("config").description("View or set IDE configuration").argument("[key]", "Config key (e.g., primary, backend)").argument("[value]", "Config value").action(async (key, value) => { const m = await import("./commands/ide.js"); await m.ideConfigCommand(key, value); });
193
207
  program
194
208
  .command("context-hub")
195
209
  .description("Manage Context Hub daemon (unified context for AI agents)")
@@ -201,6 +215,7 @@ program
201
215
  .option("--purge", "Also delete token file (for stop)")
202
216
  .allowUnknownOption()
203
217
  .action(async (action, options) => {
218
+ const { contextHubCommand } = await import("./commands/context-hub.js");
204
219
  await contextHubCommand(action, {
205
220
  port: options.port ? parseInt(options.port, 10) : undefined,
206
221
  global: options.global || false,
@@ -212,6 +227,7 @@ program
212
227
  .description("Manage Claude Code HTTP hooks for Context Hub")
213
228
  .argument("[action]", "init, status, remove")
214
229
  .action(async (action) => {
230
+ const { hooksCommand } = await import("./commands/hooks.js");
215
231
  await hooksCommand(action);
216
232
  });
217
233
  program
@@ -222,6 +238,7 @@ program
222
238
  .option("--flow <name>", "Filter approvals to a specific flow")
223
239
  .option("--all", "Approve all pending gated executions")
224
240
  .action(async (action, name, options) => {
241
+ const { flowsCommand } = await import("./commands/flows.js");
225
242
  await flowsCommand(action, name, options);
226
243
  });
227
244
  program
@@ -230,6 +247,7 @@ program
230
247
  .argument("[action]", "list, set, test, viz")
231
248
  .argument("[args...]", "Arguments for the action")
232
249
  .action(async (action, args) => {
250
+ const { scopeCommand } = await import("./commands/scope.js");
233
251
  await scopeCommand(action, ...args);
234
252
  });
235
253
  program
@@ -238,6 +256,7 @@ program
238
256
  .argument("[hours]", "Hours to look back (default: 24)", "24")
239
257
  .argument("[author]", "Filter by author name")
240
258
  .action(async (hours, author) => {
259
+ const { synopsisCommand } = await import("./commands/synopsis.js");
241
260
  await synopsisCommand(hours, author);
242
261
  });
243
262
  program
@@ -332,6 +351,7 @@ program
332
351
  .option("-d, --description <desc>", "Override service description")
333
352
  .option("--skip-git", "Skip git clone (treat URL as local path)")
334
353
  .action(async (pathOrUrl, options) => {
354
+ const { onboardCommand } = await import("./commands/onboard.js");
335
355
  await onboardCommand(pathOrUrl, options);
336
356
  });
337
357
  program
@@ -414,6 +434,7 @@ program
414
434
  .argument("[action]", "show, edit, export, import, generate")
415
435
  .option("-f, --file <path>", "File path for export/import/generate output")
416
436
  .action(async (action, options) => {
437
+ const { profileCommand } = await import("./commands/profile.js");
417
438
  await profileCommand(action, options);
418
439
  });
419
440
  program
@@ -421,6 +442,7 @@ program
421
442
  .description("Migrate services from references/ to service manager")
422
443
  .argument("[gtm-path]", "Path to GTM project (default: current directory)")
423
444
  .action(async (gtmPath) => {
445
+ const { migrateServices } = await import("./commands/migrate-services.js");
424
446
  await migrateServices(gtmPath);
425
447
  });
426
448
  // ============================================================================
@@ -435,11 +457,15 @@ program
435
457
  .option("--team", "Use Team plan ($199/mo)")
436
458
  .option("--free", "Stay on trial")
437
459
  .option("--force", "Force re-authentication")
438
- .action(loginCommand);
460
+ .action(async (options) => {
461
+ const { loginCommand } = await import("./commands/login.js");
462
+ await loginCommand(options);
463
+ });
439
464
  program
440
465
  .command("logout")
441
466
  .description("Logout from JFL platform")
442
- .action(() => {
467
+ .action(async () => {
468
+ const { logout } = await import("./commands/login.js");
443
469
  logout();
444
470
  console.log(chalk.green("Logged out successfully."));
445
471
  });
@@ -451,7 +477,7 @@ program
451
477
  .option("--telemetry", "Enable anonymous telemetry")
452
478
  .option("--show", "Show current preferences")
453
479
  .action(async (options) => {
454
- const { getConfigValue, deleteConfigKey, getConfig } = await import("./utils/jfl-config.js");
480
+ const { getConfigValue, deleteConfigKey } = await import("./utils/jfl-config.js");
455
481
  if (options.clearAi) {
456
482
  deleteConfigKey("aiCLI");
457
483
  console.log(chalk.green("\n✓ Cleared AI CLI preference"));
@@ -459,18 +485,21 @@ program
459
485
  return;
460
486
  }
461
487
  if (options.telemetry === false) {
488
+ const telemetry = await getTelemetry();
462
489
  telemetry.disable();
463
490
  console.log(chalk.green("\n✓ Telemetry disabled"));
464
491
  console.log(chalk.gray(" No data will be collected\n"));
465
492
  return;
466
493
  }
467
494
  if (options.telemetry === true) {
495
+ const telemetry = await getTelemetry();
468
496
  telemetry.enable();
469
497
  console.log(chalk.green("\n✓ Telemetry enabled"));
470
498
  console.log(chalk.gray(" Anonymous usage data helps improve JFL\n"));
471
499
  return;
472
500
  }
473
501
  if (options.show || (!options.clearAi && options.telemetry === undefined)) {
502
+ const telemetry = await getTelemetry();
474
503
  console.log(chalk.bold("\n JFL Preferences\n"));
475
504
  console.log(chalk.gray(" AI CLI:") + " " + (getConfigValue("aiCLI") || chalk.gray("none")));
476
505
  console.log(chalk.gray(" Projects tracked:") + " " + ((getConfigValue("projects") || []).length));
@@ -484,7 +513,8 @@ program
484
513
  program
485
514
  .command("wallet")
486
515
  .description("Show wallet and day pass status")
487
- .action(() => {
516
+ .action(async () => {
517
+ const { showDayPassStatus, hasWallet, getWalletAddress } = await import("./utils/auth-guard.js");
488
518
  const address = getWalletAddress();
489
519
  if (!address) {
490
520
  console.log(chalk.yellow("\n⚠️ No wallet configured"));
@@ -508,25 +538,37 @@ program
508
538
  .command("deploy")
509
539
  .description("Deploy project to JFL platform")
510
540
  .option("-f, --force", "Force deploy even if no changes")
511
- .action(deployCommand);
541
+ .action(async (options) => {
542
+ const { deployCommand } = await import("./commands/deploy.js");
543
+ await deployCommand(options);
544
+ });
512
545
  program
513
546
  .command("agents")
514
547
  .description("Manage parallel agents")
515
548
  .argument("[action]", "Action: list, create, start, stop, destroy")
516
549
  .option("-n, --name <name>", "Agent name")
517
550
  .option("-t, --task <task>", "Task for agent")
518
- .action(agentsCommand);
551
+ .action(async (action, options) => {
552
+ const { agentsCommand } = await import("./commands/agents.js");
553
+ await agentsCommand(action, options);
554
+ });
519
555
  program
520
556
  .command("feedback")
521
557
  .description("Rate your JFL session")
522
558
  .argument("[action]", "view or sync")
523
- .action(feedbackCommand);
559
+ .action(async (action) => {
560
+ const { feedbackCommand } = await import("./commands/feedback.js");
561
+ await feedbackCommand(action);
562
+ });
524
563
  program
525
564
  .command("update")
526
565
  .description("Pull latest JFL product updates")
527
566
  .option("--dry", "Show what would be updated without making changes")
528
567
  .option("--auto", "Auto mode: check once per 24h, skip if recently updated")
529
- .action((options) => updateCommand({ dry: options.dry, autoUpdate: options.auto }));
568
+ .action(async (options) => {
569
+ const { updateCommand } = await import("./commands/update.js");
570
+ await updateCommand({ dry: options.dry, autoUpdate: options.auto });
571
+ });
530
572
  // ============================================================================
531
573
  // SKILL MANAGEMENT (work offline)
532
574
  // ============================================================================
@@ -537,28 +579,43 @@ skills
537
579
  .option("-a, --available", "Show all available skills")
538
580
  .option("-c, --category <category>", "Filter by category (core or catalog)")
539
581
  .option("-t, --tag <tag>", "Filter by tag")
540
- .action(listSkillsCommand);
582
+ .action(async (options) => {
583
+ const { listSkillsCommand } = await import("./commands/skills.js");
584
+ await listSkillsCommand(options);
585
+ });
541
586
  skills
542
587
  .command("install")
543
588
  .description("Install skill(s)")
544
589
  .argument("<skills...>", "Skill name(s) to install")
545
- .action(installSkillCommand);
590
+ .action(async (skills) => {
591
+ const { installSkillCommand } = await import("./commands/skills.js");
592
+ await installSkillCommand(skills);
593
+ });
546
594
  skills
547
595
  .command("remove")
548
596
  .description("Remove skill(s)")
549
597
  .argument("<skills...>", "Skill name(s) to remove")
550
- .action(removeSkillCommand);
598
+ .action(async (skills) => {
599
+ const { removeSkillCommand } = await import("./commands/skills.js");
600
+ await removeSkillCommand(skills);
601
+ });
551
602
  skills
552
603
  .command("update")
553
604
  .description("Update installed skill(s)")
554
605
  .argument("[skill]", "Skill name to update (omit to update all)")
555
606
  .option("--dry", "Show what would be updated without making changes")
556
- .action((skill, options) => updateSkillsCommand({ ...options, skillName: skill }));
607
+ .action(async (skill, options) => {
608
+ const { updateSkillsCommand } = await import("./commands/skills.js");
609
+ await updateSkillsCommand({ ...options, skillName: skill });
610
+ });
557
611
  skills
558
612
  .command("search")
559
613
  .description("Search for skills")
560
614
  .argument("<query>", "Search query")
561
- .action(searchSkillsCommand);
615
+ .action(async (query) => {
616
+ const { searchSkillsCommand } = await import("./commands/skills.js");
617
+ await searchSkillsCommand(query);
618
+ });
562
619
  // ============================================================================
563
620
  // VOICE INPUT (work offline)
564
621
  // ============================================================================
@@ -570,12 +627,14 @@ voice
570
627
  .argument("[name]", "Model name (tiny, base, small, etc.)")
571
628
  .option("-f, --force", "Force re-download")
572
629
  .action(async (action, name, options) => {
630
+ const { voiceCommand } = await import("./commands/voice.js");
573
631
  await voiceCommand("model", action, name, options);
574
632
  });
575
633
  voice
576
634
  .command("devices")
577
635
  .description("List audio input devices")
578
636
  .action(async () => {
637
+ const { voiceCommand } = await import("./commands/voice.js");
579
638
  await voiceCommand("devices");
580
639
  });
581
640
  voice
@@ -583,6 +642,7 @@ voice
583
642
  .description("Test voice input (record 3s and transcribe)")
584
643
  .option("-d, --device <id>", "Device ID to use")
585
644
  .action(async (options) => {
645
+ const { voiceCommand } = await import("./commands/voice.js");
586
646
  await voiceCommand("test", undefined, undefined, {
587
647
  device: options.device,
588
648
  });
@@ -593,6 +653,7 @@ voice
593
653
  .option("-d, --device <id>", "Device ID to use")
594
654
  .option("-t, --duration <seconds>", "Recording duration in seconds", "5")
595
655
  .action(async (options) => {
656
+ const { voiceCommand } = await import("./commands/voice.js");
596
657
  await voiceCommand("recording", undefined, undefined, {
597
658
  device: options.device,
598
659
  duration: parseInt(options.duration, 10),
@@ -602,6 +663,7 @@ voice
602
663
  .command("setup")
603
664
  .description("First-time setup wizard for voice input")
604
665
  .action(async () => {
666
+ const { voiceCommand } = await import("./commands/voice.js");
605
667
  await voiceCommand("setup");
606
668
  });
607
669
  voice
@@ -609,6 +671,7 @@ voice
609
671
  .description("Record voice with VAD (same as running jfl voice)")
610
672
  .option("-d, --device <id>", "Device ID to use")
611
673
  .action(async (options) => {
674
+ const { voiceCommand } = await import("./commands/voice.js");
612
675
  await voiceCommand("record", undefined, undefined, {
613
676
  device: options.device,
614
677
  });
@@ -617,6 +680,7 @@ voice
617
680
  .command("help")
618
681
  .description("Show voice command help")
619
682
  .action(async () => {
683
+ const { voiceCommand } = await import("./commands/voice.js");
620
684
  await voiceCommand("help");
621
685
  });
622
686
  voice
@@ -625,6 +689,7 @@ voice
625
689
  .option("-d, --device <id>", "Device ID to use")
626
690
  .option("-m, --mode <mode>", "Hotkey mode: auto, tap, or hold (default: auto)")
627
691
  .action(async (options) => {
692
+ const { voiceCommand } = await import("./commands/voice.js");
628
693
  await voiceCommand("hotkey", undefined, undefined, {
629
694
  device: options.device,
630
695
  mode: options.mode,
@@ -639,6 +704,7 @@ daemon
639
704
  .description("Start hotkey listener in background")
640
705
  .option("-m, --mode <mode>", "Hotkey mode: auto, tap, or hold (default: auto)")
641
706
  .action(async (options) => {
707
+ const { voiceCommand } = await import("./commands/voice.js");
642
708
  await voiceCommand("daemon", "start", undefined, {
643
709
  mode: options.mode,
644
710
  });
@@ -647,22 +713,26 @@ daemon
647
713
  .command("stop")
648
714
  .description("Stop the background daemon")
649
715
  .action(async () => {
716
+ const { voiceCommand } = await import("./commands/voice.js");
650
717
  await voiceCommand("daemon", "stop");
651
718
  });
652
719
  daemon
653
720
  .command("status")
654
721
  .description("Show daemon status and uptime")
655
722
  .action(async () => {
723
+ const { voiceCommand } = await import("./commands/voice.js");
656
724
  await voiceCommand("daemon", "status");
657
725
  });
658
726
  // Default daemon action (show status)
659
727
  daemon.action(async () => {
728
+ const { voiceCommand } = await import("./commands/voice.js");
660
729
  await voiceCommand("daemon", "status");
661
730
  });
662
731
  // Running `jfl voice` without subcommand starts recording with VAD
663
732
  voice
664
733
  .option("-d, --device <id>", "Device ID to use")
665
734
  .action(async (options) => {
735
+ const { voiceCommand } = await import("./commands/voice.js");
666
736
  await voiceCommand(undefined, undefined, undefined, {
667
737
  device: options.device,
668
738
  });
@@ -674,23 +744,35 @@ const memory = program.command("memory").description("Memory system management")
674
744
  memory
675
745
  .command("init")
676
746
  .description("Initialize memory database")
677
- .action(memoryInitCommand);
747
+ .action(async () => {
748
+ const { memoryInitCommand } = await import("./commands/memory.js");
749
+ await memoryInitCommand();
750
+ });
678
751
  memory
679
752
  .command("status")
680
753
  .description("Show memory statistics")
681
- .action(memoryStatusCommand);
754
+ .action(async () => {
755
+ const { memoryStatusCommand } = await import("./commands/memory.js");
756
+ await memoryStatusCommand();
757
+ });
682
758
  memory
683
759
  .command("search")
684
760
  .description("Search memories")
685
761
  .argument("<query>", "Search query")
686
762
  .option("-t, --type <type>", "Filter by type (feature, fix, decision, etc.)")
687
763
  .option("-n, --max <n>", "Maximum results", "10")
688
- .action(memorySearchCommand);
764
+ .action(async (query, options) => {
765
+ const { memorySearchCommand } = await import("./commands/memory.js");
766
+ await memorySearchCommand(query, options);
767
+ });
689
768
  memory
690
769
  .command("index")
691
770
  .description("Reindex journal entries")
692
771
  .option("-f, --force", "Force full reindex")
693
- .action(memoryIndexCommand);
772
+ .action(async (options) => {
773
+ const { memoryIndexCommand } = await import("./commands/memory.js");
774
+ await memoryIndexCommand(options);
775
+ });
694
776
  // Alias: jfl ask <question> → jfl memory search <question>
695
777
  program
696
778
  .command("ask")
@@ -699,6 +781,7 @@ program
699
781
  .option("-t, --type <type>", "Filter by type (feature, fix, decision, etc.)")
700
782
  .option("-n, --max <n>", "Maximum results", "5")
701
783
  .action(async (question, options) => {
784
+ const { memorySearchCommand } = await import("./commands/memory.js");
702
785
  await memorySearchCommand(question, options);
703
786
  });
704
787
  // ============================================================================
@@ -733,6 +816,7 @@ program
733
816
  .option("-h, --help", "Show ralph-tui help")
734
817
  .allowUnknownOption()
735
818
  .action(async (args, options) => {
819
+ const { ralphCommand, showRalphHelp } = await import("./commands/ralph.js");
736
820
  if (options.help || args.length === 0) {
737
821
  showRalphHelp();
738
822
  return;
@@ -750,12 +834,15 @@ program
750
834
  program
751
835
  .command("peter")
752
836
  .description("Peter Parker - model-routed agent orchestrator")
753
- .argument("[action]", "setup, run, pr, experiment, status, or dashboard")
837
+ .argument("[action]", "setup, run, pr, experiment, autoresearch, status, or dashboard")
754
838
  .option("--cost", "Cost-optimized model routing (haiku-heavy)")
755
839
  .option("--balanced", "Balanced model routing (default)")
756
840
  .option("--quality", "Quality-first model routing (opus-heavy)")
757
841
  .option("-t, --task <task>", "Task to run (for run action)")
842
+ .option("-r, --rounds <n>", "Number of autoresearch rounds (default: 5)")
843
+ .option("--mode <mode>", "Experiment mode: default or autoresearch")
758
844
  .action(async (action, options) => {
845
+ const { peterCommand } = await import("./commands/peter.js");
759
846
  await peterCommand(action, options);
760
847
  });
761
848
  // ============================================================================
@@ -783,13 +870,22 @@ const clawdbot = program.command("clawdbot").description("Manage JFL plugin for
783
870
  clawdbot
784
871
  .command("setup")
785
872
  .description("Install JFL plugin into Clawdbot and configure it")
786
- .action(clawdbotSetupCommand);
873
+ .action(async () => {
874
+ const { clawdbotSetupCommand } = await import("./commands/clawdbot.js");
875
+ await clawdbotSetupCommand();
876
+ });
787
877
  clawdbot
788
878
  .command("status")
789
879
  .description("Show JFL Clawdbot plugin installation status")
790
- .action(clawdbotStatusCommand);
880
+ .action(async () => {
881
+ const { clawdbotStatusCommand } = await import("./commands/clawdbot.js");
882
+ await clawdbotStatusCommand();
883
+ });
791
884
  // Default action: show status
792
- clawdbot.action(clawdbotStatusCommand);
885
+ clawdbot.action(async () => {
886
+ const { clawdbotStatusCommand } = await import("./commands/clawdbot.js");
887
+ await clawdbotStatusCommand();
888
+ });
793
889
  // ============================================================================
794
890
  // OPENCLAW (runtime-agnostic agent protocol)
795
891
  // ============================================================================
@@ -899,6 +995,14 @@ openclaw
899
995
  const { tagCommand } = await import("./commands/openclaw.js");
900
996
  await tagCommand(service, message, options);
901
997
  });
998
+ openclaw
999
+ .command("install-skill")
1000
+ .description("Install jfl-gtm skill into OpenClaw (~/.openclaw/skills/)")
1001
+ .option("--dir <path>", "Custom install directory")
1002
+ .action(async (options) => {
1003
+ const { installSkillCommand } = await import("./commands/openclaw.js");
1004
+ await installSkillCommand(options);
1005
+ });
902
1006
  // ============================================================================
903
1007
  // CI WORKFLOWS
904
1008
  // ============================================================================
@@ -920,12 +1024,14 @@ registerEvalCommand(program);
920
1024
  registerPredictCommand(program);
921
1025
  registerPortfolioCommand(program);
922
1026
  registerVizCommand(program);
1027
+ registerFindingsCommand(program);
923
1028
  // ============================================================================
924
1029
  // TELEMETRY
925
1030
  // ============================================================================
926
1031
  const telemetryCmd = program.command("telemetry").description("Manage anonymous usage telemetry");
927
1032
  import { registerDigestCommand } from "./commands/digest.js";
928
1033
  import { registerEvalCommand } from "./commands/eval.js";
1034
+ import { registerFindingsCommand } from "./commands/findings.js";
929
1035
  import { registerPortfolioCommand } from "./commands/portfolio.js";
930
1036
  import { registerPredictCommand } from "./commands/predict.js";
931
1037
  import { registerVizCommand } from "./commands/viz.js";
@@ -934,6 +1040,7 @@ telemetryCmd
934
1040
  .command("status")
935
1041
  .description("Show telemetry status")
936
1042
  .action(async () => {
1043
+ const telemetry = await getTelemetry();
937
1044
  const enabled = telemetry.isEnabled();
938
1045
  const installId = telemetry.getInstallId();
939
1046
  const queueSize = telemetry.getQueueSize();
@@ -952,6 +1059,7 @@ telemetryCmd
952
1059
  .command("show")
953
1060
  .description("Show recent telemetry events from spillover queue")
954
1061
  .action(async () => {
1062
+ const telemetry = await getTelemetry();
955
1063
  const spillover = telemetry.getSpilloverEvents();
956
1064
  if (spillover.length === 0) {
957
1065
  console.log(chalk.gray("\n No events in spillover queue.\n"));
@@ -968,6 +1076,7 @@ telemetryCmd
968
1076
  .command("reset")
969
1077
  .description("Reset install ID (generates new anonymous ID)")
970
1078
  .action(async () => {
1079
+ const telemetry = await getTelemetry();
971
1080
  telemetry.resetInstallId();
972
1081
  console.log(chalk.green("\n Install ID reset. New ID: ") + chalk.cyan(telemetry.getInstallId()) + "\n");
973
1082
  });
@@ -983,6 +1092,7 @@ telemetryCmd
983
1092
  .option("--error-code <code>", "Error code")
984
1093
  .allowUnknownOption()
985
1094
  .action(async (options) => {
1095
+ const telemetry = await getTelemetry();
986
1096
  telemetry.track({
987
1097
  category: options.category,
988
1098
  event: options.event,
@@ -997,6 +1107,7 @@ telemetryCmd
997
1107
  // Default telemetry action
998
1108
  telemetryCmd.action(async () => {
999
1109
  // Show status by default
1110
+ const telemetry = await getTelemetry();
1000
1111
  const enabled = telemetry.isEnabled();
1001
1112
  const installId = telemetry.getInstallId();
1002
1113
  console.log(chalk.bold("\n Telemetry Status\n"));
@@ -1032,6 +1143,7 @@ program
1032
1143
  .description("Check project health and auto-repair")
1033
1144
  .option("--fix", "Auto-repair fixable issues")
1034
1145
  .action(async (options) => {
1146
+ const { doctorCommand } = await import("./commands/doctor.js");
1035
1147
  await doctorCommand({ fix: options.fix });
1036
1148
  });
1037
1149
  // ============================================================================
@@ -1044,12 +1156,14 @@ agent
1044
1156
  .argument("<name>", "Agent name (lowercase, hyphens allowed)")
1045
1157
  .option("-d, --description <desc>", "Agent description")
1046
1158
  .action(async (name, options) => {
1159
+ const { agentCommand } = await import("./commands/agent.js");
1047
1160
  await agentCommand("init", name, { description: options.description });
1048
1161
  });
1049
1162
  agent
1050
1163
  .command("list")
1051
1164
  .description("List registered agents")
1052
1165
  .action(async () => {
1166
+ const { agentCommand } = await import("./commands/agent.js");
1053
1167
  await agentCommand("list");
1054
1168
  });
1055
1169
  agent
@@ -1057,9 +1171,11 @@ agent
1057
1171
  .description("Show agent health and config")
1058
1172
  .argument("<name>", "Agent name")
1059
1173
  .action(async (name) => {
1174
+ const { agentCommand } = await import("./commands/agent.js");
1060
1175
  await agentCommand("status", name);
1061
1176
  });
1062
1177
  agent.action(async () => {
1178
+ const { agentCommand } = await import("./commands/agent.js");
1063
1179
  await agentCommand();
1064
1180
  });
1065
1181
  // ============================================================================
@@ -1099,6 +1215,56 @@ piAgents
1099
1215
  await piAgentsRunCommand(options);
1100
1216
  });
1101
1217
  // ============================================================================
1218
+ const piFleet = piCmd.command("fleet").description("VM agent fleet — spawn, collect, destroy waves of autonomous agents");
1219
+ piFleet
1220
+ .command("setup")
1221
+ .description("Install VM backend, check boot arg, create base image")
1222
+ .option("--backend <name>", "VM backend: lume (default)", "lume")
1223
+ .option("--cpus <n>", "CPUs per VM", "4")
1224
+ .option("--memory <mb>", "Memory per VM in MB", "4096")
1225
+ .option("--skip-boot-arg", "Skip VM quota boot arg check")
1226
+ .action(async (options) => {
1227
+ const { fleetSetup } = await import("./commands/pi-fleet.js");
1228
+ await fleetSetup({ ...options, cpus: parseInt(options.cpus), memory: parseInt(options.memory) });
1229
+ });
1230
+ piFleet
1231
+ .command("spawn <count>")
1232
+ .description("Spawn N agent VMs for parallel autoresearch")
1233
+ .option("--rounds <n>", "Autoresearch rounds per agent", "5")
1234
+ .option("--repo <url>", "Target repo (defaults to git remote origin)")
1235
+ .action(async (count, options) => {
1236
+ const { fleetSpawn } = await import("./commands/pi-fleet.js");
1237
+ await fleetSpawn(parseInt(count), { ...options, rounds: parseInt(options.rounds) });
1238
+ });
1239
+ piFleet
1240
+ .command("status")
1241
+ .description("Show running agents, tuple counts, health")
1242
+ .action(async () => {
1243
+ const { fleetStatus } = await import("./commands/pi-fleet.js");
1244
+ await fleetStatus();
1245
+ });
1246
+ piFleet
1247
+ .command("collect [waveId]")
1248
+ .description("Pull tuples from agents, dedup, append to training buffer")
1249
+ .action(async (waveId) => {
1250
+ const { fleetCollect } = await import("./commands/pi-fleet.js");
1251
+ await fleetCollect(waveId);
1252
+ });
1253
+ piFleet
1254
+ .command("destroy [waveId]")
1255
+ .description("Tear down a wave of agent VMs")
1256
+ .action(async (waveId) => {
1257
+ const { fleetDestroy } = await import("./commands/pi-fleet.js");
1258
+ await fleetDestroy(waveId);
1259
+ });
1260
+ piFleet
1261
+ .command("logs <agent>")
1262
+ .description("Tail an agent's autoresearch log")
1263
+ .action(async (agent) => {
1264
+ const { fleetLogs } = await import("./commands/pi-fleet.js");
1265
+ await fleetLogs(agent);
1266
+ });
1267
+ // ============================================================================
1102
1268
  // Parse and run
1103
1269
  program.parse();
1104
1270
  //# sourceMappingURL=index.js.map