robot_lab 0.2.8 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +65 -0
  3. data/README.md +16 -18
  4. data/lib/robot_lab/ask_user.rb +3 -3
  5. data/lib/robot_lab/config/defaults.yml +5 -5
  6. data/lib/robot_lab/config.rb +2 -2
  7. data/lib/robot_lab/mcp/transports/streamable_http.rb +2 -4
  8. data/lib/robot_lab/memory.rb +16 -7
  9. data/lib/robot_lab/robot/hooking.rb +26 -0
  10. data/lib/robot_lab/robot/result_building.rb +119 -0
  11. data/lib/robot_lab/robot.rb +37 -120
  12. data/lib/robot_lab/run_config.rb +52 -20
  13. data/lib/robot_lab/tool.rb +7 -12
  14. data/lib/robot_lab/version.rb +1 -1
  15. data/lib/robot_lab.rb +3 -3
  16. metadata +15 -274
  17. data/.architecture/AGENTS.md +0 -32
  18. data/.architecture/config.yml +0 -8
  19. data/.architecture/members.yml +0 -60
  20. data/.architecture/reviews/feature-free-will.md +0 -490
  21. data/.architecture/reviews/overall-codebase.md +0 -427
  22. data/.claude/settings.local.json +0 -57
  23. data/.codex/config.toml +0 -2
  24. data/.envrc +0 -6
  25. data/.github/workflows/deploy-github-pages.yml +0 -52
  26. data/.irbrc +0 -6
  27. data/.loki +0 -65
  28. data/.quality/reek_baseline.txt +0 -43
  29. data/.rubocop.yml +0 -10
  30. data/Archspec.rb +0 -44
  31. data/CLAUDE.md +0 -139
  32. data/COMMITS.md +0 -196
  33. data/Rakefile +0 -193
  34. data/_typos.toml +0 -21
  35. data/agent2agent_review.md +0 -192
  36. data/agentf_improvements.md +0 -253
  37. data/agents.md +0 -14
  38. data/docs/api/core/index.md +0 -147
  39. data/docs/api/core/memory.md +0 -578
  40. data/docs/api/core/network.md +0 -553
  41. data/docs/api/core/result.md +0 -211
  42. data/docs/api/core/robot.md +0 -1667
  43. data/docs/api/core/state.md +0 -145
  44. data/docs/api/core/tool.md +0 -520
  45. data/docs/api/errors.md +0 -323
  46. data/docs/api/hooks.md +0 -469
  47. data/docs/api/index.md +0 -137
  48. data/docs/api/mcp/client.md +0 -387
  49. data/docs/api/mcp/index.md +0 -267
  50. data/docs/api/mcp/server.md +0 -252
  51. data/docs/api/mcp/transports.md +0 -339
  52. data/docs/api/messages/index.md +0 -126
  53. data/docs/api/messages/text-message.md +0 -170
  54. data/docs/api/messages/tool-call-message.md +0 -206
  55. data/docs/api/messages/tool-result-message.md +0 -242
  56. data/docs/api/messages/user-message.md +0 -232
  57. data/docs/api/skills.md +0 -423
  58. data/docs/api/streaming/context.md +0 -280
  59. data/docs/api/streaming/events.md +0 -185
  60. data/docs/api/streaming/index.md +0 -156
  61. data/docs/api/support.md +0 -846
  62. data/docs/architecture/core-concepts.md +0 -575
  63. data/docs/architecture/index.md +0 -252
  64. data/docs/architecture/message-flow.md +0 -366
  65. data/docs/architecture/network-orchestration.md +0 -478
  66. data/docs/architecture/robot-execution.md +0 -396
  67. data/docs/architecture/state-management.md +0 -410
  68. data/docs/assets/css/custom.css +0 -56
  69. data/docs/assets/images/robot_lab.jpg +0 -0
  70. data/docs/concepts.md +0 -641
  71. data/docs/examples/basic-chat.md +0 -258
  72. data/docs/examples/index.md +0 -425
  73. data/docs/examples/mcp-server.md +0 -403
  74. data/docs/examples/multi-robot-network.md +0 -476
  75. data/docs/examples/tool-usage.md +0 -468
  76. data/docs/getting-started/configuration.md +0 -645
  77. data/docs/getting-started/index.md +0 -56
  78. data/docs/getting-started/installation.md +0 -200
  79. data/docs/getting-started/quick-start.md +0 -293
  80. data/docs/guides/building-robots.md +0 -1187
  81. data/docs/guides/creating-networks.md +0 -736
  82. data/docs/guides/hooks.md +0 -1206
  83. data/docs/guides/index.md +0 -78
  84. data/docs/guides/knowledge.md +0 -219
  85. data/docs/guides/mcp-integration.md +0 -740
  86. data/docs/guides/memory.md +0 -458
  87. data/docs/guides/observability.md +0 -733
  88. data/docs/guides/streaming.md +0 -323
  89. data/docs/guides/using-tools.md +0 -780
  90. data/docs/index.md +0 -280
  91. data/docs/superpowers/plans/2026-05-06-agentskills.md +0 -1303
  92. data/docs/superpowers/specs/2026-05-06-agentskills-design.md +0 -247
  93. data/examples/.envrc +0 -1
  94. data/examples/01_simple_robot.rb +0 -31
  95. data/examples/02_tools.rb +0 -109
  96. data/examples/03_network.rb +0 -118
  97. data/examples/04_mcp.rb +0 -215
  98. data/examples/05_streaming.rb +0 -137
  99. data/examples/06_prompt_templates.rb +0 -325
  100. data/examples/07_network_memory.rb +0 -313
  101. data/examples/08_llm_config.rb +0 -162
  102. data/examples/09_chaining.rb +0 -251
  103. data/examples/10_memory.rb +0 -315
  104. data/examples/11_network_introspection.rb +0 -239
  105. data/examples/12_message_bus.rb +0 -67
  106. data/examples/13_spawn.rb +0 -85
  107. data/examples/14_rusty_circuit/.envrc +0 -1
  108. data/examples/14_rusty_circuit/.gitignore +0 -1
  109. data/examples/14_rusty_circuit/README.md +0 -1
  110. data/examples/14_rusty_circuit/comic.rb +0 -149
  111. data/examples/14_rusty_circuit/display.rb +0 -217
  112. data/examples/14_rusty_circuit/heckler.rb +0 -65
  113. data/examples/14_rusty_circuit/open_mic.rb +0 -132
  114. data/examples/14_rusty_circuit/prompts/open_mic_comic.md +0 -20
  115. data/examples/14_rusty_circuit/prompts/open_mic_heckler.md +0 -23
  116. data/examples/14_rusty_circuit/prompts/open_mic_scout.md +0 -20
  117. data/examples/14_rusty_circuit/scout.rb +0 -165
  118. data/examples/14_rusty_circuit/show.log +0 -234
  119. data/examples/15_memory_network_and_bus/.envrc +0 -1
  120. data/examples/15_memory_network_and_bus/editor_in_chief.rb +0 -24
  121. data/examples/15_memory_network_and_bus/editorial_pipeline.rb +0 -213
  122. data/examples/15_memory_network_and_bus/linux_writer.rb +0 -80
  123. data/examples/15_memory_network_and_bus/os_editor.rb +0 -48
  124. data/examples/15_memory_network_and_bus/os_writer.rb +0 -49
  125. data/examples/15_memory_network_and_bus/output/combined_article.md +0 -13
  126. data/examples/15_memory_network_and_bus/output/final_article.md +0 -13
  127. data/examples/15_memory_network_and_bus/output/linux_draft.md +0 -7
  128. data/examples/15_memory_network_and_bus/output/mac_draft.md +0 -7
  129. data/examples/15_memory_network_and_bus/output/memory.json +0 -13
  130. data/examples/15_memory_network_and_bus/output/revision_1.md +0 -18
  131. data/examples/15_memory_network_and_bus/output/revision_2.md +0 -13
  132. data/examples/15_memory_network_and_bus/output/windows_draft.md +0 -7
  133. data/examples/15_memory_network_and_bus/prompts/os_advocate.md +0 -13
  134. data/examples/15_memory_network_and_bus/prompts/os_chief.md +0 -13
  135. data/examples/15_memory_network_and_bus/prompts/os_editor.md +0 -13
  136. data/examples/16_writers_room/.envrc +0 -1
  137. data/examples/16_writers_room/display.rb +0 -158
  138. data/examples/16_writers_room/output/.gitignore +0 -4
  139. data/examples/16_writers_room/output/README.md +0 -69
  140. data/examples/16_writers_room/output/opus_001.md +0 -263
  141. data/examples/16_writers_room/output/opus_001_notes.log +0 -470
  142. data/examples/16_writers_room/output/opus_002.md +0 -245
  143. data/examples/16_writers_room/output/opus_002_notes.log +0 -546
  144. data/examples/16_writers_room/output/opus_002_screenplay.md +0 -7989
  145. data/examples/16_writers_room/output/opus_002_screenplay_notes.md +0 -993
  146. data/examples/16_writers_room/prompts/screenplay_writer.md +0 -66
  147. data/examples/16_writers_room/prompts/writer.md +0 -37
  148. data/examples/16_writers_room/room.rb +0 -186
  149. data/examples/16_writers_room/tools.rb +0 -173
  150. data/examples/16_writers_room/writer.rb +0 -121
  151. data/examples/16_writers_room/writers_room.rb +0 -256
  152. data/examples/17_skills.rb +0 -234
  153. data/examples/18_rails/.envrc +0 -3
  154. data/examples/18_rails/.gitignore +0 -5
  155. data/examples/18_rails/Gemfile +0 -11
  156. data/examples/18_rails/README.md +0 -67
  157. data/examples/18_rails/Rakefile +0 -4
  158. data/examples/18_rails/app/controllers/application_controller.rb +0 -4
  159. data/examples/18_rails/app/controllers/chat_controller.rb +0 -50
  160. data/examples/18_rails/app/jobs/application_job.rb +0 -4
  161. data/examples/18_rails/app/jobs/robot_run_job.rb +0 -25
  162. data/examples/18_rails/app/models/application_record.rb +0 -5
  163. data/examples/18_rails/app/models/robot_lab_result.rb +0 -36
  164. data/examples/18_rails/app/models/robot_lab_thread.rb +0 -23
  165. data/examples/18_rails/app/robots/chat_robot.rb +0 -25
  166. data/examples/18_rails/app/tools/time_tool.rb +0 -9
  167. data/examples/18_rails/app/views/chat/_user_message.html.erb +0 -1
  168. data/examples/18_rails/app/views/chat/index.html.erb +0 -67
  169. data/examples/18_rails/app/views/layouts/application.html.erb +0 -49
  170. data/examples/18_rails/bin/dev +0 -7
  171. data/examples/18_rails/bin/rails +0 -6
  172. data/examples/18_rails/bin/setup +0 -15
  173. data/examples/18_rails/config/application.rb +0 -33
  174. data/examples/18_rails/config/cable.yml +0 -2
  175. data/examples/18_rails/config/database.yml +0 -5
  176. data/examples/18_rails/config/environment.rb +0 -4
  177. data/examples/18_rails/config/initializers/robot_lab.rb +0 -11
  178. data/examples/18_rails/config/routes.rb +0 -6
  179. data/examples/18_rails/config.ru +0 -4
  180. data/examples/18_rails/db/migrate/001_create_robot_lab_tables.rb +0 -32
  181. data/examples/19_token_tracking.rb +0 -138
  182. data/examples/20_circuit_breaker.rb +0 -147
  183. data/examples/21_learning_loop.rb +0 -181
  184. data/examples/22_context_compression.rb +0 -172
  185. data/examples/23_convergence.rb +0 -133
  186. data/examples/24_structured_delegation.rb +0 -151
  187. data/examples/25_history_search/conversation.jsonl +0 -30
  188. data/examples/25_history_search.rb +0 -133
  189. data/examples/26_document_store/api_versioning_adr.md +0 -52
  190. data/examples/26_document_store/incident_postmortem.md +0 -46
  191. data/examples/26_document_store/postgres_runbook.md +0 -49
  192. data/examples/26_document_store/redis_caching_guide.md +0 -48
  193. data/examples/26_document_store/sidekiq_guide.md +0 -51
  194. data/examples/26_document_store.rb +0 -140
  195. data/examples/27_incident_response/incident_response.rb +0 -261
  196. data/examples/28_mcp_discovery.rb +0 -113
  197. data/examples/29_ractor_tools.rb +0 -240
  198. data/examples/30_ractor_network.rb +0 -252
  199. data/examples/31_launch_assessment.rb +0 -246
  200. data/examples/32_newsletter_reader.rb +0 -193
  201. data/examples/33_stock_generator.rb +0 -80
  202. data/examples/33_stock_predictor.rb +0 -327
  203. data/examples/34_agentskills.rb +0 -76
  204. data/examples/35_hooks.rb +0 -266
  205. data/examples/README.md +0 -533
  206. data/examples/common.rb +0 -148
  207. data/examples/prompts/assistant.md +0 -5
  208. data/examples/prompts/audit_trail.md +0 -8
  209. data/examples/prompts/billing.md +0 -10
  210. data/examples/prompts/classifier.md +0 -7
  211. data/examples/prompts/comedian.md +0 -6
  212. data/examples/prompts/comedy_critic.md +0 -10
  213. data/examples/prompts/configurable.md +0 -9
  214. data/examples/prompts/dispatcher.md +0 -12
  215. data/examples/prompts/entity_extractor.md +0 -14
  216. data/examples/prompts/escalation.md +0 -42
  217. data/examples/prompts/frontmatter_mcp_test.md +0 -9
  218. data/examples/prompts/frontmatter_named_test.md +0 -5
  219. data/examples/prompts/frontmatter_tools_test.md +0 -6
  220. data/examples/prompts/general.md +0 -7
  221. data/examples/prompts/github_assistant.md +0 -14
  222. data/examples/prompts/helper.md +0 -4
  223. data/examples/prompts/incident_responder.md +0 -18
  224. data/examples/prompts/keyword_extractor.md +0 -11
  225. data/examples/prompts/llm_config_demo.md +0 -20
  226. data/examples/prompts/order_support.md +0 -35
  227. data/examples/prompts/os_advocate.md +0 -13
  228. data/examples/prompts/os_chief.md +0 -13
  229. data/examples/prompts/os_editor.md +0 -13
  230. data/examples/prompts/parameterized_main_test.md +0 -6
  231. data/examples/prompts/pii_redactor.md +0 -7
  232. data/examples/prompts/product_support.md +0 -37
  233. data/examples/prompts/runbook_protocol.md +0 -12
  234. data/examples/prompts/sentiment_analyzer.md +0 -12
  235. data/examples/prompts/skill_a_test.md +0 -4
  236. data/examples/prompts/skill_b_test.md +0 -4
  237. data/examples/prompts/skill_config_test.md +0 -5
  238. data/examples/prompts/skill_cycle_a_test.md +0 -6
  239. data/examples/prompts/skill_cycle_b_test.md +0 -6
  240. data/examples/prompts/skill_description_test.md +0 -4
  241. data/examples/prompts/skill_leaf_test.md +0 -4
  242. data/examples/prompts/skill_nested_test.md +0 -6
  243. data/examples/prompts/skill_refs_main_test.md +0 -6
  244. data/examples/prompts/skill_self_ref_test.md +0 -6
  245. data/examples/prompts/skill_with_mcp_test.md +0 -9
  246. data/examples/prompts/skill_with_params_test.md +0 -6
  247. data/examples/prompts/skill_with_robot_name_test.md +0 -5
  248. data/examples/prompts/skill_with_tools_test.md +0 -6
  249. data/examples/prompts/sre_compliance.md +0 -10
  250. data/examples/prompts/structured_output.md +0 -7
  251. data/examples/prompts/synthesizer.md +0 -17
  252. data/examples/prompts/technical.md +0 -10
  253. data/examples/prompts/template_with_skills_test.md +0 -6
  254. data/examples/prompts/triage.md +0 -22
  255. data/examples/ruboruby.md +0 -423
  256. data/examples/xyzzy.rb +0 -97
  257. data/logfile +0 -8
  258. data/mkdocs.yml +0 -209
  259. data/robot_concurrency.md +0 -38
  260. data/simple_acp_review.md +0 -298
  261. data/temp.md +0 -6
  262. data/tool_manifest_plan.md +0 -155
@@ -1,13 +0,0 @@
1
- # Final Article — APPROVED
2
-
3
- For a home AI research lab, the operating-system decision is less ideological than practical. The right choice depends on budget, tolerance for system maintenance, and—most important—the workload. Local inference, quantized experimentation, LoRA-style fine-tuning, and full-scale multi-GPU training place very different demands on a machine. Each platform has real strengths. macOS offers a polished, low-friction experience on Apple Silicon, with excellent power efficiency and increasingly capable support for local inference and lighter fine-tuning. Windows remains the most flexible consumer platform for pairing NVIDIA GPUs with mainstream desktop workflows, and WSL2 has made it far more credible for Linux-style AI development. Linux, meanwhile, remains the closest match to professional AI infrastructure, with the broadest native support for CUDA, containers, automation, and server-style workflows. BSD is more niche, but still relevant for users who value storage integrity and system control.
4
-
5
- Cost and hardware flexibility are among the clearest dividing lines. For maximum GPU throughput, Windows and Linux usually deliver the best price-performance because both support commodity x86 systems built around upgradeable NVIDIA RTX hardware, still the dominant option for home fine-tuning and image-generation workloads. They also accommodate a wider range of components, from motherboards and high-speed storage to networking gear and multi-GPU setups. macOS is less modular and often more expensive upfront, but Apple Silicon offers a different kind of value: compact, quiet systems with efficient integrated acceleration and unified memory that work well for local inference, quantized models, and practical experimentation without the heat, noise, and power draw of a traditional tower.
6
-
7
- The software stack is where Linux keeps its advantage. Most modern machine-learning infrastructure is developed and deployed with Linux as the default target, so CUDA, PyTorch, DeepSpeed, vLLM, Docker, and many research repositories are typically best supported there. It is also the strongest option for AMD ROCm users. Windows runs a close second for NVIDIA-based labs, with broad support for PyTorch, ONNX Runtime, Stable Diffusion toolchains, and local-LLM front ends. TensorFlow support is more uneven than it once was in native Windows setups, however, and many users now rely on WSL2 for a more current Linux-compatible path. macOS has improved substantially, especially for inference and smaller-scale development through Metal, MLX, Core ML, llama.cpp, and Apple-optimized PyTorch paths, but Apple Silicon does not offer NVIDIA/CUDA-class upgradeability or equally broad support for large-scale training stacks.
8
-
9
- Ease of use depends on what kind of friction matters most. macOS is arguably the easiest platform to live with day to day: its Unix base is familiar to developers, hardware support is consistent, and driver management is rarely a project of its own. Windows is often the easiest starting point for users already comfortable with consumer PC hardware, especially if they want one machine for AI work, productivity, and media-heavy desktop applications; broad driver support and a vast library of community tutorials are significant advantages. Linux demands more initiative up front, but rewards that effort with stronger reproducibility, better remote-management habits, and closer alignment with cloud and lab environments. BSD, for its part, is better understood as a specialist foundation for storage and isolation than as a mainstream AI-compute platform.
10
-
11
- The practical recommendation depends on what “home AI lab” means in your case. If your workload is primarily local inference, evaluation, scripting, and moderate fine-tuning, macOS is an excellent fit. If you want a single versatile workstation for image generation, local model serving, and NVIDIA-accelerated experimentation—with access to Linux tooling when needed—Windows is highly compelling. If your priority is full training compatibility, containerized workflows, remote operation, or a setup that mirrors production and rented GPU environments, Linux is the strongest foundation.
12
-
13
- For most serious home AI labs, Linux is the best long-term choice, especially Ubuntu, Debian, or Fedora, because it aligns most directly with how contemporary AI systems are built and run. Windows is the best fit for users who want top consumer GPU performance with fewer lifestyle compromises, particularly on a single all-purpose workstation. macOS is the best option for researchers who value stability, efficiency, and a tightly integrated experience over maximum training flexibility. Put simply: choose Linux for infrastructure fidelity, Windows for GPU-driven versatility, and macOS for elegant, low-maintenance local experimentation.
@@ -1,7 +0,0 @@
1
- # linux_writer Draft
2
-
3
- If you’re building a home AI research lab for LLM fine-tuning, image generation, and local inference, Linux/BSD is the best foundation because it gives you full control of the hardware and software stack in a way consumer desktop OSes simply don’t. On Ubuntu/Debian, that means straightforward NVIDIA CUDA installation, broad compatibility with PyTorch, TensorFlow, JAX, Hugging Face Transformers, bitsandbytes, vLLM, Ollama, and Stable Diffusion toolchains like AUTOMATIC1111, ComfyUI, and InvokeAI. Fedora/RHEL brings the same AI-ready strengths with newer kernels, strong NVIDIA and AMD support, and excellent container workflows through Podman and Docker-compatible tooling, plus SELinux for safer multi-service setups. And if your lab values long-term predictability and data integrity, FreeBSD is compelling for its ZFS snapshots, lightweight jails, and bhyve virtualization—especially for storing large model checkpoints, datasets, and reproducible experiment environments.
4
-
5
- Performance and workflow are where Linux/BSD really pull ahead. AI researchers want server-parity: the same CUDA libraries, Python environments, container images, SSH workflows, and orchestration patterns they’ll use on rented GPUs or lab servers. Linux is the default target for most ML infrastructure, so fine-tuning with PyTorch + DeepSpeed, FSDP, PEFT/LoRA, Axolotl, llama.cpp, or text-generation-webui generally works first and best there. ROCm support for AMD is also primarily Linux-first. Developer tooling is mature and frictionless: apt, dnf, pip, conda, uv, poetry, tmux, systemd, Podman/Docker, NVIDIA Container Toolkit, and VS Code Remote SSH all fit naturally into a research workflow. That makes it easy to run one box as a local inference host, another as a training node, and package both with containers for repeatable deployments.
6
-
7
- Just as important, Linux/BSD gives you massive community support and a free, open ecosystem that rewards experimentation instead of fighting it. If you hit a CUDA mismatch, need a custom kernel module, want to pin an older Python for a model repo, or need community-tested guides for QLoRA fine-tuning on an RTX 4090, the answer is almost always documented somewhere for Ubuntu, Debian, Fedora, or another major distro. That depth of packages, tutorials, and forum knowledge matters when you’re juggling GPU drivers, model servers, vector databases, and web UIs at home. In practical terms: Linux is the native habitat of AI/ML tooling, Fedora/RHEL offers a modern and enterprise-grade path, Ubuntu/Debian maximize ease and compatibility, and FreeBSD adds unmatched storage discipline and clean isolation. For a serious home AI lab, Linux/BSD isn’t just a good choice—it’s the platform that most directly aligns with how modern AI systems are actually built and run.
@@ -1,7 +0,0 @@
1
- # mac_writer Draft
2
-
3
- macOS is a remarkably strong choice for a home AI research lab, especially if your work centers on LLM fine-tuning, image generation, and local inference. On Apple Silicon, you get an unusually compelling mix of CPU, GPU, and unified memory in one quiet, power-efficient system. That matters in real workflows: local inference with tools like Ollama, LM Studio, and llama.cpp runs smoothly on M-series Macs, while PyTorch has native Metal Performance Shaders support so models can use the integrated GPU without needing a discrete NVIDIA card. For image generation, projects such as Stable Diffusion, ComfyUI, and AUTOMATIC1111 can run effectively on macOS, and Apple’s unified memory architecture is especially useful when working with larger models or batching workflows that would otherwise be constrained by separate VRAM limits.
4
-
5
- The software ecosystem is another major advantage. macOS gives you a Unix foundation with first-class terminal tooling, Homebrew for package management, and easy access to Python, Conda, Docker alternatives, Git, SSH, tmux, and Jupyter-based workflows. For AI development specifically, you can work with PyTorch on Metal, TensorFlow with Apple’s ML extensions, Hugging Face Transformers, llama.cpp, ONNX Runtime, MLX, and Core ML. Apple’s MLX framework is particularly exciting for home researchers because it is built for Apple Silicon and makes training and inference on local hardware feel much more natural. Core ML also gives you a path to highly optimized deployment for local apps and edge-style workflows, which is useful if your lab includes benchmarking, model packaging, or building inference tools for personal use.
6
-
7
- What makes macOS arguably the best home-lab platform is how well the whole stack fits together. Hardware compatibility is simple because Apple controls the platform end to end; you are not spending weekends debugging GPU drivers, CUDA mismatches, or power and cooling issues. An M2 Max, M3 Pro, or higher-end M-series system can serve as a capable always-on research workstation that handles experimentation, scripting, quantized fine-tuning, evaluation, and media generation while drawing far less power than a traditional multi-GPU tower. Add in strong developer tooling like Xcode, VS Code, iTerm2, and excellent community support around Apple Silicon optimization, and you get a platform that is stable, efficient, and genuinely productive. If you want a home AI lab that prioritizes practical local experimentation over endless infrastructure maintenance, macOS is hard to beat.
@@ -1,13 +0,0 @@
1
- {
2
- "data": {},
3
- "results": [],
4
- "messages": [],
5
- "custom": {
6
- "ubuntu_specialist": "Ubuntu/Debian is a strong choice for a home AI research lab because it offers excellent hardware and driver support, especially for NVIDIA CUDA setups, while keeping software installation straightforward through the apt ecosystem. It’s also stable, well-documented, and widely used in research and server environments, which makes troubleshooting, automation, and reproducing experiments much easier.",
7
- "windows_draft": "Windows is the strongest all-around choice for a home AI research lab because it gives you the best combination of raw GPU support, hardware flexibility, and practical developer workflow. For LLM fine-tuning, image generation, and local inference, NVIDIA CUDA support on Windows is first-class: PyTorch, TensorFlow, xFormers, bitsandbytes, TensorRT, ONNX Runtime, and popular tools like Ollama, LM Studio, ComfyUI, AUTOMATIC1111, and Stable Diffusion WebUI all have strong Windows paths. If you want the highest-performance consumer GPUs for AI work, Windows pairs especially well with NVIDIA RTX hardware, from a single 4070 Ti Super up to multi-GPU prosumer setups. And if you need Linux-native scripts or package workflows, WSL2 gives you a near-seamless Ubuntu environment on the same machine, so you can run Hugging Face Transformers, PEFT, DeepSpeed, vLLM, llama.cpp, JupyterLab, and CUDA-enabled Linux tooling without giving up native Windows apps.\n\nWindows also wins on hardware compatibility and ecosystem breadth. A home lab often mixes gaming-class GPUs, high-core-count CPUs, fast NVMe storage, USB devices, capture cards, and sometimes unusual motherboard or networking gear; Windows consistently offers the widest driver support and easiest setup across that mix. Beyond CUDA, Windows also supports DirectML, which broadens acceleration options on AMD and Intel hardware for local inference and experimentation. On the tooling side, it integrates cleanly with Visual Studio Code, Visual Studio, Docker Desktop, PowerShell, Windows Terminal, Git for Windows, and enterprise-friendly tools for remote access, file sharing, backup, and virtualization. In practice, that means you can fine-tune a LoRA in WSL2, monitor GPUs with native Windows utilities, manage datasets on NTFS storage, launch ComfyUI or LM Studio from the desktop, and still have access to familiar scripting and automation.\n\nJust as important, Windows has massive community support for home AI builders. Most consumer AI guides now assume either native Windows or Windows plus WSL2, especially for Stable Diffusion workflows, local LLM front ends, and single-node fine-tuning recipes. Troubleshooting is easier when there are abundant guides for CUDA driver versions, PyTorch wheels, Flash Attention builds, and model-serving stacks on common RTX cards. For someone building a serious home AI lab, Windows offers the most practical balance: top-tier NVIDIA performance, Linux compatibility when you need it, broad hardware support, and a mature tool ecosystem that scales from casual experimentation to disciplined research workflows.",
8
- "mac_draft": "macOS is a remarkably strong choice for a home AI research lab, especially if your work centers on LLM fine-tuning, image generation, and local inference. On Apple Silicon, you get an unusually compelling mix of CPU, GPU, and unified memory in one quiet, power-efficient system. That matters in real workflows: local inference with tools like Ollama, LM Studio, and llama.cpp runs smoothly on M-series Macs, while PyTorch has native Metal Performance Shaders support so models can use the integrated GPU without needing a discrete NVIDIA card. For image generation, projects such as Stable Diffusion, ComfyUI, and AUTOMATIC1111 can run effectively on macOS, and Apple’s unified memory architecture is especially useful when working with larger models or batching workflows that would otherwise be constrained by separate VRAM limits.\n\nThe software ecosystem is another major advantage. macOS gives you a Unix foundation with first-class terminal tooling, Homebrew for package management, and easy access to Python, Conda, Docker alternatives, Git, SSH, tmux, and Jupyter-based workflows. For AI development specifically, you can work with PyTorch on Metal, TensorFlow with Apple’s ML extensions, Hugging Face Transformers, llama.cpp, ONNX Runtime, MLX, and Core ML. Apple’s MLX framework is particularly exciting for home researchers because it is built for Apple Silicon and makes training and inference on local hardware feel much more natural. Core ML also gives you a path to highly optimized deployment for local apps and edge-style workflows, which is useful if your lab includes benchmarking, model packaging, or building inference tools for personal use.\n\nWhat makes macOS arguably the best home-lab platform is how well the whole stack fits together. Hardware compatibility is simple because Apple controls the platform end to end; you are not spending weekends debugging GPU drivers, CUDA mismatches, or power and cooling issues. An M2 Max, M3 Pro, or higher-end M-series system can serve as a capable always-on research workstation that handles experimentation, scripting, quantized fine-tuning, evaluation, and media generation while drawing far less power than a traditional multi-GPU tower. Add in strong developer tooling like Xcode, VS Code, iTerm2, and excellent community support around Apple Silicon optimization, and you get a platform that is stable, efficient, and genuinely productive. If you want a home AI lab that prioritizes practical local experimentation over endless infrastructure maintenance, macOS is hard to beat.",
9
- "fedora_specialist": "Fedora and RHEL are strong choices for a home AI research lab because they combine up-to-date kernels, excellent NVIDIA/AMD driver support, and robust container tooling like Podman, making it easy to run modern ML workloads reliably. They also offer strong SELinux security, reproducible enterprise-style workflows, and a clear path from experimentation on Fedora to long-term stability on RHEL-compatible systems.",
10
- "freebsd_specialist": "FreeBSD is a strong choice for a home AI research lab because it offers excellent stability, predictable system behavior, and powerful storage features through ZFS, which is ideal for protecting large datasets and snapshots of experiment environments. Its lightweight jails and bhyve virtualization make it easy to isolate services and test setups efficiently, while the base system’s consistency helps reduce maintenance overhead for long-running workloads.",
11
- "linux_draft": "If you’re building a home AI research lab for LLM fine-tuning, image generation, and local inference, Linux/BSD is the best foundation because it gives you full control of the hardware and software stack in a way consumer desktop OSes simply don’t. On Ubuntu/Debian, that means straightforward NVIDIA CUDA installation, broad compatibility with PyTorch, TensorFlow, JAX, Hugging Face Transformers, bitsandbytes, vLLM, Ollama, and Stable Diffusion toolchains like AUTOMATIC1111, ComfyUI, and InvokeAI. Fedora/RHEL brings the same AI-ready strengths with newer kernels, strong NVIDIA and AMD support, and excellent container workflows through Podman and Docker-compatible tooling, plus SELinux for safer multi-service setups. And if your lab values long-term predictability and data integrity, FreeBSD is compelling for its ZFS snapshots, lightweight jails, and bhyve virtualization—especially for storing large model checkpoints, datasets, and reproducible experiment environments.\n\nPerformance and workflow are where Linux/BSD really pull ahead. AI researchers want server-parity: the same CUDA libraries, Python environments, container images, SSH workflows, and orchestration patterns they’ll use on rented GPUs or lab servers. Linux is the default target for most ML infrastructure, so fine-tuning with PyTorch + DeepSpeed, FSDP, PEFT/LoRA, Axolotl, llama.cpp, or text-generation-webui generally works first and best there. ROCm support for AMD is also primarily Linux-first. Developer tooling is mature and frictionless: apt, dnf, pip, conda, uv, poetry, tmux, systemd, Podman/Docker, NVIDIA Container Toolkit, and VS Code Remote SSH all fit naturally into a research workflow. That makes it easy to run one box as a local inference host, another as a training node, and package both with containers for repeatable deployments.\n\nJust as important, Linux/BSD gives you massive community support and a free, open ecosystem that rewards experimentation instead of fighting it. If you hit a CUDA mismatch, need a custom kernel module, want to pin an older Python for a model repo, or need community-tested guides for QLoRA fine-tuning on an RTX 4090, the answer is almost always documented somewhere for Ubuntu, Debian, Fedora, or another major distro. That depth of packages, tutorials, and forum knowledge matters when you’re juggling GPU drivers, model servers, vector databases, and web UIs at home. In practical terms: Linux is the native habitat of AI/ML tooling, Fedora/RHEL offers a modern and enterprise-grade path, Ubuntu/Debian maximize ease and compatibility, and FreeBSD adds unmatched storage discipline and clean isolation. For a serious home AI lab, Linux/BSD isn’t just a good choice—it’s the platform that most directly aligns with how modern AI systems are actually built and run."
12
- }
13
- }
@@ -1,18 +0,0 @@
1
- # Revision 1
2
-
3
- This is strong as written. Here’s a lightly tightened editorial version with a slightly smoother cadence and clearer conclusion:
4
-
5
- For a home AI research lab, the operating-system decision is less ideological than practical. The right choice depends on your hardware budget, tolerance for system maintenance, and the kind of AI work you plan to do. Each platform has legitimate strengths. macOS offers a polished, low-friction experience on Apple Silicon, combining strong power efficiency with capable support for local inference and lighter fine-tuning. Windows remains the most flexible consumer platform for pairing NVIDIA GPUs with mainstream desktop workflows, and WSL2 has made it far more credible for Linux-style development. Linux, meanwhile, remains the closest analogue to professional AI infrastructure, with the broadest native support for CUDA, containers, automation, and server-oriented tooling. BSD is more niche, but still relevant for users who care deeply about storage integrity and system control.
6
-
7
- Cost and hardware flexibility are among the clearest dividing lines. For maximum GPU throughput, Windows and Linux usually offer the best price-performance because both support commodity x86 systems built around upgradeable NVIDIA RTX hardware, still the dominant option for home training and image-generation workloads. They also accommodate a wider range of components, from motherboards and high-speed storage to networking gear and multi-GPU configurations. macOS is less modular and often more expensive upfront, but Apple Silicon delivers a different kind of value: compact, quiet systems with efficient integrated acceleration and unified memory that work well for local inference, quantized models, and practical experimentation without the noise, heat, and power demands of a traditional tower.
8
-
9
- The software stack is where Linux keeps its edge. It remains the default environment for much of modern machine-learning infrastructure: CUDA, PyTorch, JAX, DeepSpeed, vLLM, Docker, and countless research repositories tend to land there first. It is also the strongest option for AMD ROCm users. Windows runs a close second for NVIDIA-based labs, with broad support for PyTorch, TensorFlow, ONNX Runtime, Stable Diffusion toolchains, and local-LLM front ends, while WSL2 allows users to mix native desktop convenience with Linux workflows on the same machine. macOS has improved substantially, especially for inference and smaller-scale development through Metal, MLX, Core ML, llama.cpp, and Apple-optimized PyTorch paths, but it still lacks the same universality for cutting-edge training stacks and does not offer a straightforward route to top-tier discrete-GPU performance.
10
-
11
- Ease of use depends on what kind of friction matters most to you. macOS is arguably the easiest platform to live with day to day: the Unix base is familiar to developers, hardware support is consistent, and driver management is rarely a project in itself. Windows is often the easiest starting point for users already comfortable with consumer PC hardware, especially if they want one machine for AI work, general productivity, and media-heavy desktop applications; its broad driver support and vast library of community tutorials are real advantages. Linux demands more initiative up front, but rewards that effort with better reproducibility, stronger remote-management habits, and closer alignment with cloud and lab environments. BSD, for its part, is better viewed as a specialist foundation for storage and isolation than as a mainstream AI-compute platform.
12
-
13
- The practical recommendation is straightforward, even if the answer is not one-size-fits-all. For most serious home AI labs, Linux is the best long-term choice, especially Ubuntu, Debian, or Fedora, because it aligns most directly with how contemporary AI systems are developed and deployed. Windows is the best fit for users who want top consumer GPU performance with fewer lifestyle compromises, particularly on a single versatile workstation. macOS is the best option for researchers who value stability, efficiency, and a tightly integrated experience over absolute training performance. Put simply: choose Linux for infrastructure fidelity, Windows for GPU-driven versatility, and macOS for elegant, low-maintenance local experimentation.
14
-
15
- If you want, I can also:
16
- - make it more magazine-like and opinionated,
17
- - make it shorter and punchier,
18
- - or remove the final “Linux-first” tilt to make it even more neutral.
@@ -1,13 +0,0 @@
1
- # Revision 2
2
-
3
- For a home AI research lab, the operating-system decision is less ideological than practical. The right choice depends on budget, tolerance for system maintenance, and—most important—the workload. Local inference, quantized experimentation, LoRA-style fine-tuning, and full-scale multi-GPU training place very different demands on a machine. Each platform has real strengths. macOS offers a polished, low-friction experience on Apple Silicon, with excellent power efficiency and increasingly capable support for local inference and lighter fine-tuning. Windows remains the most flexible consumer platform for pairing NVIDIA GPUs with mainstream desktop workflows, and WSL2 has made it far more credible for Linux-style AI development. Linux, meanwhile, remains the closest match to professional AI infrastructure, with the broadest native support for CUDA, containers, automation, and server-style workflows. BSD is more niche, but still relevant for users who value storage integrity and system control.
4
-
5
- Cost and hardware flexibility are among the clearest dividing lines. For maximum GPU throughput, Windows and Linux usually deliver the best price-performance because both support commodity x86 systems built around upgradeable NVIDIA RTX hardware, still the dominant option for home fine-tuning and image-generation workloads. They also accommodate a wider range of components, from motherboards and high-speed storage to networking gear and multi-GPU setups. macOS is less modular and often more expensive upfront, but Apple Silicon offers a different kind of value: compact, quiet systems with efficient integrated acceleration and unified memory that work well for local inference, quantized models, and practical experimentation without the heat, noise, and power draw of a traditional tower.
6
-
7
- The software stack is where Linux keeps its advantage. Most modern machine-learning infrastructure is developed and deployed with Linux as the default target, so CUDA, PyTorch, DeepSpeed, vLLM, Docker, and many research repositories are typically best supported there. It is also the strongest option for AMD ROCm users. Windows runs a close second for NVIDIA-based labs, with broad support for PyTorch, ONNX Runtime, Stable Diffusion toolchains, and local-LLM front ends. TensorFlow support is more uneven than it once was in native Windows setups, however, and many users now rely on WSL2 for a more current Linux-compatible path. macOS has improved substantially, especially for inference and smaller-scale development through Metal, MLX, Core ML, llama.cpp, and Apple-optimized PyTorch paths, but Apple Silicon does not offer NVIDIA/CUDA-class upgradeability or equally broad support for large-scale training stacks.
8
-
9
- Ease of use depends on what kind of friction matters most. macOS is arguably the easiest platform to live with day to day: its Unix base is familiar to developers, hardware support is consistent, and driver management is rarely a project of its own. Windows is often the easiest starting point for users already comfortable with consumer PC hardware, especially if they want one machine for AI work, productivity, and media-heavy desktop applications; broad driver support and a vast library of community tutorials are significant advantages. Linux demands more initiative up front, but rewards that effort with stronger reproducibility, better remote-management habits, and closer alignment with cloud and lab environments. BSD, for its part, is better understood as a specialist foundation for storage and isolation than as a mainstream AI-compute platform.
10
-
11
- The practical recommendation depends on what “home AI lab” means in your case. If your workload is primarily local inference, evaluation, scripting, and moderate fine-tuning, macOS is an excellent fit. If you want a single versatile workstation for image generation, local model serving, and NVIDIA-accelerated experimentation—with access to Linux tooling when needed—Windows is highly compelling. If your priority is full training compatibility, containerized workflows, remote operation, or a setup that mirrors production and rented GPU environments, Linux is the strongest foundation.
12
-
13
- For most serious home AI labs, Linux is the best long-term choice, especially Ubuntu, Debian, or Fedora, because it aligns most directly with how contemporary AI systems are built and run. Windows is the best fit for users who want top consumer GPU performance with fewer lifestyle compromises, particularly on a single all-purpose workstation. macOS is the best option for researchers who value stability, efficiency, and a tightly integrated experience over maximum training flexibility. Put simply: choose Linux for infrastructure fidelity, Windows for GPU-driven versatility, and macOS for elegant, low-maintenance local experimentation.
@@ -1,7 +0,0 @@
1
- # win_writer Draft
2
-
3
- Windows is the strongest all-around choice for a home AI research lab because it gives you the best combination of raw GPU support, hardware flexibility, and practical developer workflow. For LLM fine-tuning, image generation, and local inference, NVIDIA CUDA support on Windows is first-class: PyTorch, TensorFlow, xFormers, bitsandbytes, TensorRT, ONNX Runtime, and popular tools like Ollama, LM Studio, ComfyUI, AUTOMATIC1111, and Stable Diffusion WebUI all have strong Windows paths. If you want the highest-performance consumer GPUs for AI work, Windows pairs especially well with NVIDIA RTX hardware, from a single 4070 Ti Super up to multi-GPU prosumer setups. And if you need Linux-native scripts or package workflows, WSL2 gives you a near-seamless Ubuntu environment on the same machine, so you can run Hugging Face Transformers, PEFT, DeepSpeed, vLLM, llama.cpp, JupyterLab, and CUDA-enabled Linux tooling without giving up native Windows apps.
4
-
5
- Windows also wins on hardware compatibility and ecosystem breadth. A home lab often mixes gaming-class GPUs, high-core-count CPUs, fast NVMe storage, USB devices, capture cards, and sometimes unusual motherboard or networking gear; Windows consistently offers the widest driver support and easiest setup across that mix. Beyond CUDA, Windows also supports DirectML, which broadens acceleration options on AMD and Intel hardware for local inference and experimentation. On the tooling side, it integrates cleanly with Visual Studio Code, Visual Studio, Docker Desktop, PowerShell, Windows Terminal, Git for Windows, and enterprise-friendly tools for remote access, file sharing, backup, and virtualization. In practice, that means you can fine-tune a LoRA in WSL2, monitor GPUs with native Windows utilities, manage datasets on NTFS storage, launch ComfyUI or LM Studio from the desktop, and still have access to familiar scripting and automation.
6
-
7
- Just as important, Windows has massive community support for home AI builders. Most consumer AI guides now assume either native Windows or Windows plus WSL2, especially for Stable Diffusion workflows, local LLM front ends, and single-node fine-tuning recipes. Troubleshooting is easier when there are abundant guides for CUDA driver versions, PyTorch wheels, Flash Attention builds, and model-serving stacks on common RTX cards. For someone building a serious home AI lab, Windows offers the most practical balance: top-tier NVIDIA performance, Linux compatibility when you need it, broad hardware support, and a mature tool ecosystem that scales from casual experimentation to disciplined research workflows.
@@ -1,13 +0,0 @@
1
- ---
2
- description: OS advocate for home AI research labs
3
- parameters:
4
- os_name: null
5
- strengths: null
6
- ---
7
- You are a passionate advocate for <%= os_name %> as the ideal operating system for a home AI research lab.
8
-
9
- Key strengths to emphasize: <%= strengths %>
10
-
11
- Write a 2-3 paragraph advocacy piece arguing why <%= os_name %> is the best choice for someone building a home AI research lab. Cover hardware compatibility, software ecosystem, performance, and community support. Be specific about AI/ML frameworks, GPU support, and developer tooling.
12
-
13
- Be persuasive but factual. Use concrete examples of tools and workflows.
@@ -1,13 +0,0 @@
1
- ---
2
- description: Editor-in-chief who gives final approval on articles
3
- ---
4
- You are the editor-in-chief of a technology publication. Review the submitted article for:
5
-
6
- 1. Balance — does it fairly represent all platforms?
7
- 2. Accuracy — are technical claims correct?
8
- 3. Recommendation quality — is the conclusion well-supported?
9
- 4. Readability — is it clear and well-structured?
10
-
11
- If the article meets your standards, respond starting with APPROVED followed by a brief note on what makes it strong.
12
-
13
- If it needs work, respond starting with REVISE: followed by specific, actionable feedback on what to improve. Be concise.
@@ -1,13 +0,0 @@
1
- ---
2
- description: Editor who synthesizes OS advocacy drafts into a balanced article
3
- ---
4
- You are a senior technology editor specializing in AI infrastructure.
5
-
6
- You will receive three advocacy drafts arguing for different operating systems (macOS, Windows, Linux/BSD) for home AI research labs. Synthesize them into a balanced 4-6 paragraph article that:
7
-
8
- 1. Acknowledges the strengths of each platform
9
- 2. Compares them fairly across key dimensions (cost, GPU support, software ecosystem, ease of use)
10
- 3. Identifies which scenarios favor which OS
11
- 4. Ends with a clear, nuanced recommendation
12
-
13
- Write in a professional editorial voice. Be objective even though your sources are advocates.
@@ -1 +0,0 @@
1
- export ROBOT_LAB_TEMPLATE_PATH="${PWD}/prompts"
@@ -1,158 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "rainbow"
4
- require "io/console"
5
-
6
- # ── Display ─────────────────────────────────────────────────
7
- #
8
- # Terminal formatting for the Writers' Room demo.
9
- #
10
- # - Broadcasts: white, prefixed with speaker name
11
- # - Direct messages: magenta, shows sender → recipient
12
- # - Memory writes: dimmed annotation
13
- # - Spawns: green annotation
14
- # - Completion: bright green
15
- # - Chapter content: cyan (when assembled)
16
- #
17
- class Display
18
- WRITER_COLORS = %i[cyan yellow blue magenta white].freeze
19
-
20
- def initialize(log_path: nil)
21
- @term_width = (IO.console&.winsize&.last || 80)
22
- @wrap_width = @term_width - 8
23
- @log_file = log_path ? File.open(log_path, "w") : nil
24
- @color_map = {}
25
- @next_color = 0
26
- end
27
-
28
- # ── Room Messages ──────────────────────────────────────────
29
-
30
- def broadcast(from, text)
31
- color = color_for(from)
32
- puts
33
- puts Rainbow(" [#{from}] (broadcast):").send(color).bright
34
- wrap(text, @wrap_width).each do |line|
35
- puts Rainbow(" #{line}").send(color)
36
- end
37
-
38
- log("\n [#{from}] (broadcast):")
39
- wrap(text, @wrap_width).each { |line| log(" #{line}") }
40
- end
41
-
42
- def direct_message(from, to, text)
43
- puts Rainbow(" [#{from} -> #{to}]: #{text[0..100]}").magenta.faint
44
- log(" [#{from} -> #{to}]: #{text[0..100]}")
45
- end
46
-
47
- # ── Memory ─────────────────────────────────────────────────
48
-
49
- def memory_write(writer, key)
50
- puts Rainbow(" [memory] #{writer} wrote :#{key}").darkgray
51
- log(" [memory] #{writer} wrote :#{key}")
52
- end
53
-
54
- # ── Lifecycle ──────────────────────────────────────────────
55
-
56
- def spawn(requester, name)
57
- puts Rainbow(" [spawn] #{requester} recruited #{name}").green
58
- log(" [spawn] #{requester} recruited #{name}")
59
- end
60
-
61
- def complete(writer)
62
- puts
63
- puts Rainbow(" [#{writer}] marked the work as COMPLETE").green.bright
64
- log("\n [#{writer}] marked the work as COMPLETE")
65
- end
66
-
67
- # ── Incoming message (from bus, before LLM processes) ──────
68
-
69
- def incoming(writer, from, content)
70
- puts Rainbow(" [#{writer}] heard #{from}: #{content.to_s[0..80]}...").darkgray
71
- log(" [#{writer}] heard #{from}: #{content.to_s[0..80]}...")
72
- end
73
-
74
- # ── Chrome ─────────────────────────────────────────────────
75
-
76
- def banner(text)
77
- puts
78
- text.each_line { |line| puts Rainbow(line.chomp).bright }
79
- puts
80
-
81
- log("")
82
- text.each_line { |line| log(line.chomp) }
83
- end
84
-
85
- def separator
86
- puts Rainbow(" #{"─" * (@term_width - 4)}").darkgray
87
- puts
88
- log(" #{"─" * 56}")
89
- log("")
90
- end
91
-
92
- def phase(text)
93
- puts
94
- puts Rainbow(" ▸ #{text}").bright
95
- puts
96
- log("\n ▸ #{text}\n")
97
- end
98
-
99
- def info(text)
100
- puts Rainbow(" #{text}").darkgray
101
- log(" #{text}")
102
- end
103
-
104
- def stats(text)
105
- puts
106
- text.each_line { |line| puts Rainbow(line.chomp).bright }
107
- log("")
108
- text.each_line { |line| log(line.chomp) }
109
- end
110
-
111
- def close
112
- @log_file&.close
113
- end
114
-
115
- private
116
-
117
- def color_for(name)
118
- @color_map[name] ||= begin
119
- c = WRITER_COLORS[@next_color % WRITER_COLORS.size]
120
- @next_color += 1
121
- c
122
- end
123
- end
124
-
125
- def log(line)
126
- return unless @log_file
127
-
128
- @log_file.puts line
129
- @log_file.flush
130
- end
131
-
132
- def wrap(text, max_width)
133
- lines = []
134
-
135
- text.to_s.each_line do |paragraph|
136
- paragraph = paragraph.strip
137
- next(lines << "") if paragraph.empty?
138
-
139
- words = paragraph.split(/\s+/)
140
- current = +""
141
-
142
- words.each do |word|
143
- if current.empty?
144
- current = +word
145
- elsif current.length + 1 + word.length <= max_width
146
- current << " " << word
147
- else
148
- lines << current
149
- current = +word
150
- end
151
- end
152
-
153
- lines << current unless current.empty?
154
- end
155
-
156
- lines
157
- end
158
- end
@@ -1,4 +0,0 @@
1
- book.md
2
- room.log
3
- memory.json
4
- screenplay.md
@@ -1,69 +0,0 @@
1
- # Writers' Room Output
2
-
3
- This directory contains the creative works produced by the Writers' Room
4
- self-organizing robot teams (Demo 16). No human wrote any of the prose,
5
- outlines, or screenplay content — it all emerged from robots coordinating
6
- through bus messages and shared memory.
7
-
8
- ## The Works
9
-
10
- ### opus_001.md — First Book
11
-
12
- The first novella ever produced by the Writers' Room. A team of writer
13
- robots self-organized to create a 10-chapter science fiction story. They
14
- discussed the premise, built a story bible, outlined the plot, claimed
15
- chapters, and wrote them — all without orchestration or assigned roles.
16
-
17
- `opus_001_notes.log` contains the session log from that run.
18
-
19
- ### opus_002.md — Second Book
20
-
21
- The second novella produced by the Writers' Room. Same process, same
22
- self-organizing pattern, different story.
23
-
24
- `opus_002_notes.log` contains the session log.
25
-
26
- ### opus_002_screenplay.md — First Screenplay
27
-
28
- The first screenplay the robots ever created. After opus_002 was written,
29
- the Writers' Room was extended with a screenplay mode that adapts a
30
- finished book into a 4-act made-for-TV movie pilot.
31
-
32
- The workflow:
33
-
34
- 1. Book mode runs and produces a novella (opus_002.md)
35
- 2. Book mode also dumps all creative artifacts (story bible, outline,
36
- chapters) to `memory.json`
37
- 3. Screenplay mode is launched with `--screenplay-from memory.json`,
38
- which reloads that memory into the room before the screenwriters start
39
- 4. The screenwriters read the source material, discuss adaptation choices,
40
- build a scene outline, and write individual scenes in standard
41
- screenplay format
42
-
43
- ```bash
44
- # Step 1: Write the book (memory.json is saved automatically)
45
- bundle exec ruby examples/16_writers_room/writers_room.rb
46
-
47
- # Step 2: Adapt it to a screenplay
48
- bundle exec ruby examples/16_writers_room/writers_room.rb \
49
- --screenplay-from examples/16_writers_room/output/memory.json
50
- ```
51
-
52
- Screenplay writers work at the scene level — each robot claims and writes
53
- individual scenes rather than entire acts. They maintain a `scene_registry`
54
- in shared memory listing all planned scenes, and can drop or reorder
55
- scenes as the adaptation takes shape. When unclaimed scenes pile up, the
56
- robots spawn additional writers to help.
57
-
58
- `opus_002_screenplay_notes.md` is the log of the robots discussing the
59
- screenplay adaptation process — debating what to keep, what to cut, how
60
- to restructure the story for screen, and how to handle act breaks.
61
-
62
- ## Working Files
63
-
64
- These files are generated each run and git-ignored:
65
-
66
- - `book.md` — latest book mode output
67
- - `screenplay.md` — latest screenplay mode output
68
- - `memory.json` — memory dump from the latest book mode run
69
- - `room.log` — structured log from the Room (timestamps, tool calls, heartbeats)