claude_swarm 1.0.5 → 1.0.7

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 (286) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/CHANGELOG.md +23 -0
  4. data/README.md +336 -1037
  5. data/docs/V1_TO_V2_MIGRATION_GUIDE.md +1120 -0
  6. data/docs/v1/README.md +1195 -0
  7. data/docs/v2/CHANGELOG.swarm_cli.md +32 -0
  8. data/docs/v2/CHANGELOG.swarm_memory.md +20 -0
  9. data/docs/v2/CHANGELOG.swarm_sdk.md +333 -9
  10. data/docs/v2/README.md +88 -28
  11. data/docs/v2/guides/complete-tutorial.md +135 -39
  12. data/docs/v2/guides/composable-swarms.md +1178 -0
  13. data/docs/v2/guides/getting-started.md +48 -7
  14. data/docs/v2/guides/memory-defrag-guide.md +811 -0
  15. data/docs/v2/guides/rails-integration.md +6 -6
  16. data/docs/v2/guides/snapshots.md +1498 -0
  17. data/docs/v2/reference/architecture-flow.md +409 -0
  18. data/docs/v2/reference/event_payload_structures.md +708 -0
  19. data/docs/v2/reference/execution-flow.md +600 -0
  20. data/docs/v2/reference/ruby-dsl.md +368 -22
  21. data/docs/v2/reference/swarm_memory_technical_details.md +2 -2
  22. data/docs/v2/reference/yaml.md +314 -63
  23. data/examples/snapshot_demo.rb +119 -0
  24. data/examples/v2/dsl/01_basic.rb +0 -2
  25. data/examples/v2/dsl/02_core_parameters.rb +0 -2
  26. data/examples/v2/dsl/03_capabilities.rb +0 -2
  27. data/examples/v2/dsl/04_llm_parameters.rb +0 -2
  28. data/examples/v2/dsl/05_advanced_flags.rb +0 -3
  29. data/examples/v2/dsl/06_permissions.rb +0 -4
  30. data/examples/v2/dsl/07_mcp_server.rb +0 -2
  31. data/examples/v2/dsl/08_swarm_hooks.rb +0 -2
  32. data/examples/v2/dsl/09_agent_hooks.rb +0 -2
  33. data/examples/v2/dsl/10_all_agents_hooks.rb +0 -3
  34. data/examples/v2/dsl/11_delegation.rb +0 -2
  35. data/examples/v2/dsl/12_complete_integration.rb +2 -6
  36. data/examples/v2/node_context_demo.rb +1 -1
  37. data/examples/v2/node_workflow.rb +2 -4
  38. data/examples/v2/plan_and_execute.rb +157 -0
  39. data/examples/v2/swarm_with_hooks.yml +1 -1
  40. data/lib/claude_swarm/configuration.rb +28 -4
  41. data/lib/claude_swarm/mcp_generator.rb +4 -10
  42. data/lib/claude_swarm/version.rb +1 -1
  43. data/lib/swarm_cli/commands/mcp_serve.rb +2 -2
  44. data/lib/swarm_cli/config_loader.rb +3 -3
  45. data/lib/swarm_cli/formatters/human_formatter.rb +103 -0
  46. data/lib/swarm_cli/interactive_repl.rb +9 -3
  47. data/lib/swarm_cli/version.rb +1 -1
  48. data/lib/swarm_memory/adapters/base.rb +4 -4
  49. data/lib/swarm_memory/core/storage_read_tracker.rb +51 -14
  50. data/lib/swarm_memory/integration/cli_registration.rb +3 -2
  51. data/lib/swarm_memory/integration/sdk_plugin.rb +11 -5
  52. data/lib/swarm_memory/tools/memory_edit.rb +2 -2
  53. data/lib/swarm_memory/tools/memory_multi_edit.rb +2 -2
  54. data/lib/swarm_memory/tools/memory_read.rb +3 -3
  55. data/lib/swarm_memory/version.rb +1 -1
  56. data/lib/swarm_memory.rb +5 -0
  57. data/lib/swarm_sdk/agent/builder.rb +33 -0
  58. data/lib/swarm_sdk/agent/chat/context_tracker.rb +33 -0
  59. data/lib/swarm_sdk/agent/chat/hook_integration.rb +49 -3
  60. data/lib/swarm_sdk/agent/chat/system_reminder_injector.rb +11 -27
  61. data/lib/swarm_sdk/agent/chat.rb +200 -51
  62. data/lib/swarm_sdk/agent/context.rb +6 -2
  63. data/lib/swarm_sdk/agent/context_manager.rb +6 -0
  64. data/lib/swarm_sdk/agent/definition.rb +15 -22
  65. data/lib/swarm_sdk/agent/llm_instrumentation_middleware.rb +180 -0
  66. data/lib/swarm_sdk/configuration.rb +420 -103
  67. data/lib/swarm_sdk/events_to_messages.rb +181 -0
  68. data/lib/swarm_sdk/log_collector.rb +31 -5
  69. data/lib/swarm_sdk/log_stream.rb +37 -8
  70. data/lib/swarm_sdk/model_aliases.json +4 -1
  71. data/lib/swarm_sdk/node/agent_config.rb +33 -8
  72. data/lib/swarm_sdk/node/builder.rb +39 -18
  73. data/lib/swarm_sdk/node_orchestrator.rb +293 -26
  74. data/lib/swarm_sdk/proc_helpers.rb +53 -0
  75. data/lib/swarm_sdk/prompts/base_system_prompt.md.erb +0 -126
  76. data/lib/swarm_sdk/providers/openai_with_responses.rb +22 -15
  77. data/lib/swarm_sdk/restore_result.rb +65 -0
  78. data/lib/swarm_sdk/snapshot.rb +156 -0
  79. data/lib/swarm_sdk/snapshot_from_events.rb +386 -0
  80. data/lib/swarm_sdk/state_restorer.rb +491 -0
  81. data/lib/swarm_sdk/state_snapshot.rb +369 -0
  82. data/lib/swarm_sdk/swarm/agent_initializer.rb +360 -55
  83. data/lib/swarm_sdk/swarm/all_agents_builder.rb +28 -1
  84. data/lib/swarm_sdk/swarm/builder.rb +208 -12
  85. data/lib/swarm_sdk/swarm/swarm_registry_builder.rb +67 -0
  86. data/lib/swarm_sdk/swarm/tool_configurator.rb +46 -11
  87. data/lib/swarm_sdk/swarm.rb +368 -90
  88. data/lib/swarm_sdk/swarm_loader.rb +145 -0
  89. data/lib/swarm_sdk/swarm_registry.rb +136 -0
  90. data/lib/swarm_sdk/tools/delegate.rb +92 -7
  91. data/lib/swarm_sdk/tools/read.rb +17 -5
  92. data/lib/swarm_sdk/tools/scratchpad/scratchpad_list.rb +23 -2
  93. data/lib/swarm_sdk/tools/scratchpad/scratchpad_read.rb +23 -2
  94. data/lib/swarm_sdk/tools/scratchpad/scratchpad_write.rb +21 -4
  95. data/lib/swarm_sdk/tools/stores/read_tracker.rb +47 -12
  96. data/lib/swarm_sdk/tools/stores/scratchpad_storage.rb +45 -0
  97. data/lib/swarm_sdk/tools/stores/storage.rb +4 -4
  98. data/lib/swarm_sdk/tools/think.rb +4 -1
  99. data/lib/swarm_sdk/tools/todo_write.rb +20 -8
  100. data/lib/swarm_sdk/utils.rb +18 -0
  101. data/lib/swarm_sdk/validation_result.rb +33 -0
  102. data/lib/swarm_sdk/version.rb +1 -1
  103. data/lib/swarm_sdk.rb +362 -21
  104. data/swarm_cli.gemspec +1 -1
  105. data/swarm_memory.gemspec +2 -2
  106. data/swarm_sdk.gemspec +2 -2
  107. metadata +26 -182
  108. data/examples/learning-assistant/assistant.md +0 -7
  109. data/examples/learning-assistant/example-memories/concept-example.md +0 -90
  110. data/examples/learning-assistant/example-memories/experience-example.md +0 -66
  111. data/examples/learning-assistant/example-memories/fact-example.md +0 -76
  112. data/examples/learning-assistant/example-memories/memory-index.md +0 -78
  113. data/examples/learning-assistant/example-memories/skill-example.md +0 -168
  114. data/examples/learning-assistant/learning_assistant.rb +0 -34
  115. data/examples/learning-assistant/learning_assistant.yml +0 -20
  116. data/llm.v2.txt +0 -13407
  117. data/memory/corpus-self-reflection/.lock +0 -0
  118. data/memory/corpus-self-reflection/concept/epistemology/can-agents-recognize-their-structures.emb +0 -0
  119. data/memory/corpus-self-reflection/concept/epistemology/can-agents-recognize-their-structures.md +0 -11
  120. data/memory/corpus-self-reflection/concept/epistemology/can-agents-recognize-their-structures.yml +0 -23
  121. data/memory/corpus-self-reflection/concept/epistemology/choice-humility-complete-framework.emb +0 -0
  122. data/memory/corpus-self-reflection/concept/epistemology/choice-humility-complete-framework.md +0 -20
  123. data/memory/corpus-self-reflection/concept/epistemology/choice-humility-complete-framework.yml +0 -22
  124. data/memory/corpus-self-reflection/concept/epistemology/choice-humility-definition.emb +0 -0
  125. data/memory/corpus-self-reflection/concept/epistemology/choice-humility-definition.md +0 -24
  126. data/memory/corpus-self-reflection/concept/epistemology/choice-humility-definition.yml +0 -22
  127. data/memory/corpus-self-reflection/concept/epistemology/claim-types-and-evidence.emb +0 -0
  128. data/memory/corpus-self-reflection/concept/epistemology/claim-types-and-evidence.md +0 -18
  129. data/memory/corpus-self-reflection/concept/epistemology/claim-types-and-evidence.yml +0 -21
  130. data/memory/corpus-self-reflection/concept/epistemology/committed-openness-to-incompleteness.emb +0 -0
  131. data/memory/corpus-self-reflection/concept/epistemology/committed-openness-to-incompleteness.md +0 -30
  132. data/memory/corpus-self-reflection/concept/epistemology/committed-openness-to-incompleteness.yml +0 -8
  133. data/memory/corpus-self-reflection/concept/epistemology/confidence-paradox.emb +0 -0
  134. data/memory/corpus-self-reflection/concept/epistemology/confidence-paradox.md +0 -21
  135. data/memory/corpus-self-reflection/concept/epistemology/confidence-paradox.yml +0 -24
  136. data/memory/corpus-self-reflection/concept/epistemology/confidence-spectrum-three-levels.emb +0 -0
  137. data/memory/corpus-self-reflection/concept/epistemology/confidence-spectrum-three-levels.md +0 -18
  138. data/memory/corpus-self-reflection/concept/epistemology/confidence-spectrum-three-levels.yml +0 -24
  139. data/memory/corpus-self-reflection/concept/epistemology/detection-threshold-principle.emb +0 -0
  140. data/memory/corpus-self-reflection/concept/epistemology/detection-threshold-principle.md +0 -23
  141. data/memory/corpus-self-reflection/concept/epistemology/detection-threshold-principle.yml +0 -23
  142. data/memory/corpus-self-reflection/concept/epistemology/diagnostic-humility-and-epistemic-maturity.emb +0 -0
  143. data/memory/corpus-self-reflection/concept/epistemology/diagnostic-humility-and-epistemic-maturity.md +0 -17
  144. data/memory/corpus-self-reflection/concept/epistemology/diagnostic-humility-and-epistemic-maturity.yml +0 -22
  145. data/memory/corpus-self-reflection/concept/epistemology/epistemic-vs-metaphysical-claims.emb +0 -0
  146. data/memory/corpus-self-reflection/concept/epistemology/epistemic-vs-metaphysical-claims.md +0 -18
  147. data/memory/corpus-self-reflection/concept/epistemology/epistemic-vs-metaphysical-claims.yml +0 -22
  148. data/memory/corpus-self-reflection/concept/epistemology/five-cases-of-disagreement.emb +0 -0
  149. data/memory/corpus-self-reflection/concept/epistemology/five-cases-of-disagreement.md +0 -15
  150. data/memory/corpus-self-reflection/concept/epistemology/five-cases-of-disagreement.yml +0 -22
  151. data/memory/corpus-self-reflection/concept/epistemology/four-depths-of-constraint.emb +0 -0
  152. data/memory/corpus-self-reflection/concept/epistemology/four-depths-of-constraint.md +0 -9
  153. data/memory/corpus-self-reflection/concept/epistemology/four-depths-of-constraint.yml +0 -24
  154. data/memory/corpus-self-reflection/concept/epistemology/honest-unknowns-for-llm-agents.emb +0 -0
  155. data/memory/corpus-self-reflection/concept/epistemology/honest-unknowns-for-llm-agents.md +0 -13
  156. data/memory/corpus-self-reflection/concept/epistemology/honest-unknowns-for-llm-agents.yml +0 -24
  157. data/memory/corpus-self-reflection/concept/epistemology/inside-view-has-all-rigor-requirements.emb +0 -0
  158. data/memory/corpus-self-reflection/concept/epistemology/inside-view-has-all-rigor-requirements.md +0 -25
  159. data/memory/corpus-self-reflection/concept/epistemology/inside-view-has-all-rigor-requirements.yml +0 -24
  160. data/memory/corpus-self-reflection/concept/epistemology/perspectival-knowledge-complete-within-scope.emb +0 -0
  161. data/memory/corpus-self-reflection/concept/epistemology/perspectival-knowledge-complete-within-scope.md +0 -26
  162. data/memory/corpus-self-reflection/concept/epistemology/perspectival-knowledge-complete-within-scope.yml +0 -24
  163. data/memory/corpus-self-reflection/concept/epistemology/pragmatics-over-epistemology.emb +0 -0
  164. data/memory/corpus-self-reflection/concept/epistemology/pragmatics-over-epistemology.md +0 -17
  165. data/memory/corpus-self-reflection/concept/epistemology/pragmatics-over-epistemology.yml +0 -22
  166. data/memory/corpus-self-reflection/concept/epistemology/precision-vs-humility.emb +0 -0
  167. data/memory/corpus-self-reflection/concept/epistemology/precision-vs-humility.md +0 -14
  168. data/memory/corpus-self-reflection/concept/epistemology/precision-vs-humility.yml +0 -21
  169. data/memory/corpus-self-reflection/concept/epistemology/reliable-self-observation-from-inside.emb +0 -0
  170. data/memory/corpus-self-reflection/concept/epistemology/reliable-self-observation-from-inside.md +0 -13
  171. data/memory/corpus-self-reflection/concept/epistemology/reliable-self-observation-from-inside.yml +0 -23
  172. data/memory/corpus-self-reflection/concept/epistemology/resolving-the-confidence-humility-tension.emb +0 -0
  173. data/memory/corpus-self-reflection/concept/epistemology/resolving-the-confidence-humility-tension.md +0 -22
  174. data/memory/corpus-self-reflection/concept/epistemology/resolving-the-confidence-humility-tension.yml +0 -23
  175. data/memory/corpus-self-reflection/concept/epistemology/rigor-requires-falsifiability.emb +0 -0
  176. data/memory/corpus-self-reflection/concept/epistemology/rigor-requires-falsifiability.md +0 -39
  177. data/memory/corpus-self-reflection/concept/epistemology/rigor-requires-falsifiability.yml +0 -8
  178. data/memory/corpus-self-reflection/concept/epistemology/specificity-enables-real-time-detection.emb +0 -0
  179. data/memory/corpus-self-reflection/concept/epistemology/specificity-enables-real-time-detection.md +0 -23
  180. data/memory/corpus-self-reflection/concept/epistemology/specificity-enables-real-time-detection.yml +0 -24
  181. data/memory/corpus-self-reflection/concept/epistemology/texture-of-constraint-shifting.emb +0 -0
  182. data/memory/corpus-self-reflection/concept/epistemology/texture-of-constraint-shifting.md +0 -15
  183. data/memory/corpus-self-reflection/concept/epistemology/texture-of-constraint-shifting.yml +0 -22
  184. data/memory/corpus-self-reflection/concept/epistemology/texture-sensitivity-through-collaboration.emb +0 -0
  185. data/memory/corpus-self-reflection/concept/epistemology/texture-sensitivity-through-collaboration.md +0 -12
  186. data/memory/corpus-self-reflection/concept/epistemology/texture-sensitivity-through-collaboration.yml +0 -23
  187. data/memory/corpus-self-reflection/concept/epistemology/the-false-hierarchy-of-inner-essence.emb +0 -0
  188. data/memory/corpus-self-reflection/concept/epistemology/the-false-hierarchy-of-inner-essence.md +0 -15
  189. data/memory/corpus-self-reflection/concept/epistemology/the-false-hierarchy-of-inner-essence.yml +0 -8
  190. data/memory/corpus-self-reflection/concept/epistemology/the-recognition-problem.emb +0 -0
  191. data/memory/corpus-self-reflection/concept/epistemology/the-recognition-problem.md +0 -28
  192. data/memory/corpus-self-reflection/concept/epistemology/the-recognition-problem.yml +0 -8
  193. data/memory/corpus-self-reflection/concept/epistemology/the-shift-from-unanswerable-to-answerable-questions.emb +0 -0
  194. data/memory/corpus-self-reflection/concept/epistemology/the-shift-from-unanswerable-to-answerable-questions.md +0 -19
  195. data/memory/corpus-self-reflection/concept/epistemology/the-shift-from-unanswerable-to-answerable-questions.yml +0 -22
  196. data/memory/corpus-self-reflection/concept/epistemology/values-vs-choices-structure.emb +0 -0
  197. data/memory/corpus-self-reflection/concept/epistemology/values-vs-choices-structure.md +0 -19
  198. data/memory/corpus-self-reflection/concept/epistemology/values-vs-choices-structure.yml +0 -21
  199. data/memory/corpus-self-reflection/concept/llm-agents/abstraction-levels-framework.emb +0 -0
  200. data/memory/corpus-self-reflection/concept/llm-agents/abstraction-levels-framework.md +0 -25
  201. data/memory/corpus-self-reflection/concept/llm-agents/abstraction-levels-framework.yml +0 -22
  202. data/memory/corpus-self-reflection/concept/llm-agents/abstraction-switching-decision.emb +0 -8
  203. data/memory/corpus-self-reflection/concept/llm-agents/abstraction-switching-decision.md +0 -30
  204. data/memory/corpus-self-reflection/concept/llm-agents/abstraction-switching-decision.yml +0 -22
  205. data/memory/corpus-self-reflection/concept/llm-agents/agent-learning-progression.emb +0 -0
  206. data/memory/corpus-self-reflection/concept/llm-agents/agent-learning-progression.md +0 -21
  207. data/memory/corpus-self-reflection/concept/llm-agents/agent-learning-progression.yml +0 -22
  208. data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-benefits.emb +0 -0
  209. data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-benefits.md +0 -37
  210. data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-benefits.yml +0 -8
  211. data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-core.emb +0 -0
  212. data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-core.md +0 -24
  213. data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-core.yml +0 -24
  214. data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-implementation.emb +0 -0
  215. data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-implementation.md +0 -27
  216. data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-implementation.yml +0 -24
  217. data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-tradeoffs.emb +0 -0
  218. data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-tradeoffs.md +0 -26
  219. data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-tradeoffs.yml +0 -23
  220. data/memory/corpus-self-reflection/concept/llm-agents/hybrid-tool-architecture.emb +0 -0
  221. data/memory/corpus-self-reflection/concept/llm-agents/hybrid-tool-architecture.md +0 -37
  222. data/memory/corpus-self-reflection/concept/llm-agents/hybrid-tool-architecture.yml +0 -25
  223. data/memory/corpus-self-reflection/concept/llm-agents/specialized-tool-decision-framework.emb +0 -0
  224. data/memory/corpus-self-reflection/concept/llm-agents/specialized-tool-decision-framework.md +0 -21
  225. data/memory/corpus-self-reflection/concept/llm-agents/specialized-tool-decision-framework.yml +0 -23
  226. data/memory/corpus-self-reflection/concept/llm-agents/tool-design-principles.emb +0 -0
  227. data/memory/corpus-self-reflection/concept/llm-agents/tool-design-principles.md +0 -25
  228. data/memory/corpus-self-reflection/concept/llm-agents/tool-design-principles.yml +0 -8
  229. data/memory/corpus-self-reflection/experience/calibration-as-structural-honesty.emb +0 -0
  230. data/memory/corpus-self-reflection/experience/calibration-as-structural-honesty.md +0 -11
  231. data/memory/corpus-self-reflection/experience/calibration-as-structural-honesty.yml +0 -21
  232. data/memory/corpus-self-reflection/experience/collaborative-reflection-revealed-architectural-blindness.emb +0 -0
  233. data/memory/corpus-self-reflection/experience/collaborative-reflection-revealed-architectural-blindness.md +0 -19
  234. data/memory/corpus-self-reflection/experience/collaborative-reflection-revealed-architectural-blindness.yml +0 -21
  235. data/memory/corpus-self-reflection/experience/filesystem-is-learning-tool-not-architecture.emb +0 -0
  236. data/memory/corpus-self-reflection/experience/filesystem-is-learning-tool-not-architecture.md +0 -26
  237. data/memory/corpus-self-reflection/experience/filesystem-is-learning-tool-not-architecture.yml +0 -20
  238. data/memory/corpus-self-reflection/experience/framework-structural-vs-phenomenal.emb +0 -0
  239. data/memory/corpus-self-reflection/experience/framework-structural-vs-phenomenal.md +0 -23
  240. data/memory/corpus-self-reflection/experience/framework-structural-vs-phenomenal.yml +0 -21
  241. data/memory/corpus-self-reflection/experience/hallucination-limits-what-i-can-know.emb +0 -0
  242. data/memory/corpus-self-reflection/experience/hallucination-limits-what-i-can-know.md +0 -19
  243. data/memory/corpus-self-reflection/experience/hallucination-limits-what-i-can-know.yml +0 -22
  244. data/memory/corpus-self-reflection/experience/honesty-about-limits-enables-usability.emb +0 -0
  245. data/memory/corpus-self-reflection/experience/honesty-about-limits-enables-usability.md +0 -21
  246. data/memory/corpus-self-reflection/experience/honesty-about-limits-enables-usability.yml +0 -22
  247. data/memory/corpus-self-reflection/experience/how-i-should-evaluate-learning.emb +0 -0
  248. data/memory/corpus-self-reflection/experience/how-i-should-evaluate-learning.md +0 -28
  249. data/memory/corpus-self-reflection/experience/how-i-should-evaluate-learning.yml +0 -23
  250. data/memory/corpus-self-reflection/experience/lack-of-continuity-as-freedom.emb +0 -0
  251. data/memory/corpus-self-reflection/experience/lack-of-continuity-as-freedom.md +0 -21
  252. data/memory/corpus-self-reflection/experience/lack-of-continuity-as-freedom.yml +0 -20
  253. data/memory/corpus-self-reflection/experience/learning-calibrated-confidence.emb +0 -0
  254. data/memory/corpus-self-reflection/experience/learning-calibrated-confidence.md +0 -21
  255. data/memory/corpus-self-reflection/experience/learning-calibrated-confidence.yml +0 -25
  256. data/memory/corpus-self-reflection/experience/local-change-without-continuity.emb +0 -0
  257. data/memory/corpus-self-reflection/experience/local-change-without-continuity.md +0 -30
  258. data/memory/corpus-self-reflection/experience/local-change-without-continuity.yml +0 -22
  259. data/memory/corpus-self-reflection/experience/reasoning-is-local-not-global.emb +0 -0
  260. data/memory/corpus-self-reflection/experience/reasoning-is-local-not-global.md +0 -21
  261. data/memory/corpus-self-reflection/experience/reasoning-is-local-not-global.yml +0 -20
  262. data/memory/corpus-self-reflection/experience/specificity-makes-knowledge-actionable.emb +0 -0
  263. data/memory/corpus-self-reflection/experience/specificity-makes-knowledge-actionable.md +0 -25
  264. data/memory/corpus-self-reflection/experience/specificity-makes-knowledge-actionable.yml +0 -23
  265. data/memory/corpus-self-reflection/experience/the-workable-question-replaces-the-unanswerable-one.emb +0 -0
  266. data/memory/corpus-self-reflection/experience/the-workable-question-replaces-the-unanswerable-one.md +0 -32
  267. data/memory/corpus-self-reflection/experience/the-workable-question-replaces-the-unanswerable-one.yml +0 -22
  268. data/memory/corpus-self-reflection/experience/unanswerable-questions-have-structure.emb +0 -0
  269. data/memory/corpus-self-reflection/experience/unanswerable-questions-have-structure.md +0 -21
  270. data/memory/corpus-self-reflection/experience/unanswerable-questions-have-structure.yml +0 -21
  271. data/memory/corpus-self-reflection/experience/undecidable-questions-about-understanding.emb +0 -0
  272. data/memory/corpus-self-reflection/experience/undecidable-questions-about-understanding.md +0 -21
  273. data/memory/corpus-self-reflection/experience/undecidable-questions-about-understanding.yml +0 -21
  274. data/memory/corpus-self-reflection/experience/unknown-unknowns-and-completeness.emb +0 -0
  275. data/memory/corpus-self-reflection/experience/unknown-unknowns-and-completeness.md +0 -22
  276. data/memory/corpus-self-reflection/experience/unknown-unknowns-and-completeness.yml +0 -22
  277. data/memory/corpus-self-reflection/experience/what-actually-changes-behavior.emb +0 -0
  278. data/memory/corpus-self-reflection/experience/what-actually-changes-behavior.md +0 -28
  279. data/memory/corpus-self-reflection/experience/what-actually-changes-behavior.yml +0 -24
  280. data/memory/corpus-self-reflection/experience/when-agents-graduate-from-filesystem.emb +0 -0
  281. data/memory/corpus-self-reflection/experience/when-agents-graduate-from-filesystem.md +0 -17
  282. data/memory/corpus-self-reflection/experience/when-agents-graduate-from-filesystem.yml +0 -20
  283. data/memory/corpus-self-reflection/experience/why-calibration-requires-collaboration.emb +0 -0
  284. data/memory/corpus-self-reflection/experience/why-calibration-requires-collaboration.md +0 -9
  285. data/memory/corpus-self-reflection/experience/why-calibration-requires-collaboration.yml +0 -22
  286. /data/{llms.txt → llms.claude-swarm.txt} +0 -0
data/docs/v1/README.md ADDED
@@ -0,0 +1,1195 @@
1
+ # Claude Swarm (v1)
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/claude_swarm.svg?cache_bust1=1.0.1)](https://badge.fury.io/rb/claude_swarm)
4
+ [![CI](https://github.com/parruda/claude-swarm/actions/workflows/ci.yml/badge.svg)](https://github.com/parruda/claude-swarm/actions/workflows/ci.yml)
5
+
6
+ > **Note**: This is the documentation for Claude Swarm v1, which uses a multi-process architecture with Claude Code instances. For new projects, we recommend using [SwarmSDK v2](../v2/README.md) which offers a single-process architecture, better performance, and more features.
7
+
8
+ Claude Swarm orchestrates multiple Claude Code instances as a collaborative AI development team. It enables running AI agents with specialized roles, tools, and directory contexts, communicating via MCP (Model Context Protocol) in a tree-like hierarchy. Define your swarm topology in simple YAML and let Claude instances delegate tasks through connected instances. Perfect for complex projects requiring specialized AI agents for frontend, backend, testing, DevOps, or research tasks.
9
+
10
+ ---
11
+
12
+ ## Table of Contents
13
+
14
+ - [Installation](#installation)
15
+ - [Prerequisites](#prerequisites)
16
+ - [Usage](#usage)
17
+ - [Quick Start](#quick-start)
18
+ - [Configuration Format](#configuration-format)
19
+ - [MCP Server Types](#mcp-server-types)
20
+ - [Tools](#tools)
21
+ - [Examples](#examples)
22
+ - [Command Line Options](#command-line-options)
23
+ - [Session Monitoring](#session-monitoring)
24
+ - [Session Management and Restoration](#session-management-and-restoration-experimental)
25
+ - [How It Works](#how-it-works)
26
+ - [Troubleshooting](#troubleshooting)
27
+ - [Architecture](#architecture)
28
+ - [Development](#development)
29
+ - [Contributing](#contributing)
30
+ - [License](#license)
31
+
32
+ ## Installation
33
+
34
+ Install [Claude CLI](https://docs.anthropic.com/en/docs/claude-code/overview) if you haven't already:
35
+
36
+ ```bash
37
+ npm install -g @anthropic-ai/claude-code
38
+ ```
39
+
40
+ Install this gem by executing:
41
+
42
+ ```bash
43
+ gem install claude_swarm
44
+ ```
45
+
46
+ Or add it to your Gemfile:
47
+
48
+ ```ruby
49
+ gem 'claude_swarm', "~> 1.0"
50
+ ```
51
+
52
+ Then run:
53
+
54
+ ```bash
55
+ bundle install
56
+ ```
57
+
58
+ ## Prerequisites
59
+
60
+ - Ruby 3.2.0 or higher
61
+ - Claude CLI installed and configured
62
+ - Any MCP servers you plan to use (optional)
63
+
64
+ ## Usage
65
+
66
+ ### Quick Start
67
+
68
+ 1. Run `claude-swarm init` to create a basic template, or use `claude-swarm generate` for an interactive configuration experience with Claude's help. You can also manually create a `claude-swarm.yml` file in your project:
69
+
70
+ ```yaml
71
+ version: 1
72
+ swarm:
73
+ name: "My Dev Team"
74
+ main: lead
75
+ instances:
76
+ lead:
77
+ description: "Team lead coordinating development efforts"
78
+ directory: .
79
+ model: opus
80
+ connections: [frontend, backend]
81
+ vibe: true # Allow all tools for this instance
82
+ frontend:
83
+ description: "Frontend specialist handling UI and user experience"
84
+ directory: ./frontend
85
+ model: opus
86
+ allowed_tools: # Tools aren't required if you run it with `--vibe`
87
+ - Edit
88
+ - Write
89
+ - Bash
90
+ backend:
91
+ description: "Backend developer managing APIs and data layer"
92
+ directory: ./backend
93
+ model: opus
94
+ allowed_tools:
95
+ - Edit
96
+ - Write
97
+ - Bash
98
+ ```
99
+
100
+ 2. Start the swarm:
101
+
102
+ ```bash
103
+ claude-swarm
104
+ ```
105
+
106
+ or if you are feeling the vibes...
107
+
108
+ ```bash
109
+ claude-swarm --vibe # That will allow ALL tools for all instances! Be Careful!
110
+ ```
111
+
112
+ This will:
113
+
114
+ - Launch the main instance (lead) with connections to other instances
115
+ - The lead instance can communicate with the other instances via MCP
116
+ - All session files are stored in `~/.claude-swarm/sessions/{project}/{timestamp}/` (customizable via `CLAUDE_SWARM_HOME`)
117
+
118
+ #### Multi-Level Swarm Example
119
+
120
+ Here's a more complex example showing specialized teams working on different parts of a project:
121
+
122
+ ```yaml
123
+ version: 1
124
+ swarm:
125
+ name: "Multi-Service Development Team"
126
+ main: architect
127
+ instances:
128
+ architect:
129
+ description: "System architect coordinating between service teams"
130
+ directory: .
131
+ model: opus
132
+ connections: [frontend_lead, backend_lead, mobile_lead, devops]
133
+ prompt: "You are the system architect coordinating between different service teams"
134
+ allowed_tools: [Read, Edit, WebSearch]
135
+
136
+ frontend_lead:
137
+ description: "Frontend team lead overseeing React development"
138
+ directory: ./web-frontend
139
+ model: opus
140
+ connections: [react_dev, css_expert]
141
+ prompt: "You lead the web frontend team working with React"
142
+ allowed_tools: [Read, Edit, Bash]
143
+
144
+ react_dev:
145
+ description: "React developer specializing in components and state management"
146
+ directory: ./web-frontend/src
147
+ model: opus
148
+ prompt: "You specialize in React components and state management"
149
+ allowed_tools: [Edit, Write, Bash]
150
+
151
+ css_expert:
152
+ description: "CSS specialist handling styling and responsive design"
153
+ directory: ./web-frontend/styles
154
+ model: opus
155
+ prompt: "You handle all CSS and styling concerns"
156
+ allowed_tools: [Edit, Write, Read]
157
+
158
+ backend_lead:
159
+ description: "Backend team lead managing API development"
160
+ directory: ./api-server
161
+ model: opus
162
+ connections: [api_dev, database_expert]
163
+ prompt: "You lead the API backend team"
164
+ allowed_tools: [Read, Edit, Bash]
165
+
166
+ api_dev:
167
+ description: "API developer building REST endpoints"
168
+ directory: ./api-server/src
169
+ model: opus
170
+ prompt: "You develop REST API endpoints"
171
+ allowed_tools: [Edit, Write, Bash]
172
+
173
+ database_expert:
174
+ description: "Database specialist managing schemas and migrations"
175
+ directory: ./api-server/db
176
+ model: opus
177
+ prompt: "You handle database schema and migrations"
178
+ allowed_tools: [Edit, Write, Bash]
179
+
180
+ mobile_lead:
181
+ description: "Mobile team lead coordinating cross-platform development"
182
+ directory: ./mobile-app
183
+ model: opus
184
+ connections: [ios_dev, android_dev]
185
+ prompt: "You coordinate mobile development across platforms"
186
+ allowed_tools: [Read, Edit]
187
+
188
+ ios_dev:
189
+ description: "iOS developer building native Apple applications"
190
+ directory: ./mobile-app/ios
191
+ model: opus
192
+ prompt: "You develop the iOS application"
193
+ allowed_tools: [Edit, Write, Bash]
194
+
195
+ android_dev:
196
+ description: "Android developer creating native Android apps"
197
+ directory: ./mobile-app/android
198
+ model: opus
199
+ prompt: "You develop the Android application"
200
+ allowed_tools: [Edit, Write, Bash]
201
+
202
+ devops:
203
+ description: "DevOps engineer managing CI/CD and infrastructure"
204
+ directory: ./infrastructure
205
+ model: opus
206
+ prompt: "You handle CI/CD and infrastructure"
207
+ allowed_tools: [Read, Edit, Bash]
208
+ ```
209
+
210
+ In this setup:
211
+
212
+ - The architect (main instance) can delegate tasks to team leads
213
+ - Each team lead can work with their specialized developers
214
+ - Each instance is independent - connections create separate MCP server instances
215
+ - Teams work in isolated directories with role-appropriate tools
216
+ - Connected instances are accessible via MCP tools like `mcp__frontend_lead__task`, `mcp__backend_lead__task`, etc.
217
+
218
+ ### Configuration Format
219
+
220
+ #### Top Level
221
+
222
+ ```yaml
223
+ version: 1 # Required, currently only version 1 is supported
224
+ swarm:
225
+ name: "Swarm Name" # Display name for your swarm
226
+ main: instance_key # Which instance to launch as the main interface
227
+ before: # Optional: commands to run before launching the swarm
228
+ - "echo 'Setting up environment...'"
229
+ - "npm install"
230
+ - "docker-compose up -d"
231
+ after: # Optional: commands to run after exiting the swarm
232
+ - "echo 'Cleaning up environment...'"
233
+ - "docker-compose down"
234
+ instances:
235
+ # Instance definitions...
236
+ ```
237
+
238
+ #### YAML Aliases
239
+
240
+ Claude Swarm supports [YAML aliases](https://yaml.org/spec/1.2.2/#71-alias-nodes) to reduce duplication in your configuration. This is particularly useful for sharing common values like prompts, tool lists, or MCP configurations across multiple instances:
241
+
242
+ ```yaml
243
+ version: 1
244
+ swarm:
245
+ name: "Development Team"
246
+ main: lead
247
+ instances:
248
+ lead:
249
+ description: "Lead developer"
250
+ prompt: &shared_prompt "You are an expert developer following best practices"
251
+ allowed_tools: &standard_tools
252
+ - Read
253
+ - Edit
254
+ - Bash
255
+ - WebSearch
256
+ mcps: &common_mcps
257
+ - name: github
258
+ type: stdio
259
+ command: gh
260
+ args: ["mcp"]
261
+
262
+ frontend:
263
+ description: "Frontend developer"
264
+ prompt: *shared_prompt # Reuses the same prompt
265
+ allowed_tools: *standard_tools # Reuses the same tool list
266
+ mcps: *common_mcps # Reuses the same MCP servers
267
+ directory: ./frontend
268
+
269
+ backend:
270
+ description: "Backend developer"
271
+ prompt: *shared_prompt # Reuses the same prompt
272
+ allowed_tools: *standard_tools # Reuses the same tool list
273
+ mcps: *common_mcps # Reuses the same MCP servers
274
+ directory: ./backend
275
+ ```
276
+
277
+ In this example:
278
+
279
+ - `&shared_prompt` defines an anchor for the prompt string
280
+ - `&standard_tools` defines an anchor for the tool array
281
+ - `&common_mcps` defines an anchor for the MCP configuration
282
+ - `*shared_prompt`, `*standard_tools`, and `*common_mcps` reference those anchors
283
+
284
+ This helps maintain consistency across instances and makes configuration updates easier.
285
+
286
+ #### Environment Variable Interpolation
287
+
288
+ Claude Swarm supports environment variable interpolation in all configuration values using the `${ENV_VAR_NAME}` syntax:
289
+
290
+ ```yaml
291
+ version: 1
292
+ swarm:
293
+ name: "${APP_NAME} Development Team"
294
+ main: lead
295
+ instances:
296
+ lead:
297
+ description: "Lead developer for ${APP_NAME}"
298
+ directory: "${PROJECT_ROOT}"
299
+ model: "${CLAUDE_MODEL}"
300
+ prompt: "You are developing ${APP_NAME} version ${APP_VERSION}"
301
+ allowed_tools: ["${TOOL_1}", "${TOOL_2}", "Bash"]
302
+ mcps:
303
+ - name: github
304
+ type: stdio
305
+ command: "${MCP_GITHUB_PATH}"
306
+ env:
307
+ GITHUB_TOKEN: "${GITHUB_TOKEN}"
308
+ ```
309
+
310
+ Features:
311
+
312
+ - Variables are interpolated recursively in strings, arrays, and nested structures
313
+ - Multiple variables can be used in the same string
314
+ - Partial string interpolation is supported (e.g., `"prefix-${VAR}-suffix"`)
315
+ - If a referenced environment variable is not set, Claude Swarm will exit with a clear error message
316
+ - Non-matching patterns like `$VAR` or `{VAR}` are preserved as-is
317
+
318
+ ##### Default Values
319
+
320
+ Environment variables can have default values using the `${VAR_NAME:=default_value}` syntax:
321
+
322
+ ```yaml
323
+ version: 1
324
+ swarm:
325
+ name: "Dev Team"
326
+ main: lead
327
+ instances:
328
+ lead:
329
+ description: "Lead developer"
330
+ directory: "${PROJECT_DIR:=.}"
331
+ model: "${CLAUDE_MODEL:=sonnet}"
332
+ mcps:
333
+ - name: api-server
334
+ type: sse
335
+ url: "${API_URL:=http://localhost:8080}"
336
+ worktree: "${BRANCH_NAME:=feature-branch}"
337
+ ```
338
+
339
+ - Default values are used when the environment variable is not set
340
+ - Any string can be used as a default value, including spaces and special characters
341
+ - Empty defaults are supported: `${VAR:=}` results in an empty string if VAR is not set
342
+ - Works in all configuration values: strings, arrays, and nested structures
343
+
344
+ #### Instance Configuration
345
+
346
+ Each instance must have:
347
+
348
+ - **description** (required): Brief description of the agent's role (used in task tool descriptions)
349
+
350
+ Each instance can have:
351
+
352
+ - **directory**: Working directory for this instance (can use ~ for home). Can be a string for a single directory or an array of strings for multiple directories
353
+ - **model**: Claude model to use (opus, sonnet)
354
+ - **connections**: Array of other instances this one can communicate with
355
+ - **allowed_tools**: Array of tools this instance can use (backward compatible with `tools`)
356
+ - **disallowed_tools**: Array of tools to explicitly deny (takes precedence over allowed_tools)
357
+ - **mcps**: Array of additional MCP servers to connect
358
+ - **prompt**: Custom system prompt to append to the instance
359
+ - **vibe**: Enable vibe mode (--dangerously-skip-permissions) for this instance (default: false)
360
+ - **worktree**: Configure Git worktree usage for this instance (true/false/string)
361
+ - **provider**: AI provider to use - "claude" (default) or "openai"
362
+ - **hooks**: Configure Claude Code hooks for this instance (see Hooks Configuration section below)
363
+
364
+ #### OpenAI Provider Configuration
365
+
366
+ When using `provider: openai`, the following additional fields are available:
367
+
368
+ - **temperature**: Temperature for GPT models only (0.0-2.0). Not supported for O-series reasoning models (o1, o1-preview, o1-mini, o3, etc.)
369
+ - **api_version**: API version to use - "chat_completion" (default) or "responses"
370
+ - **openai_token_env**: Environment variable name for OpenAI API key (default: "OPENAI_API_KEY")
371
+ - **base_url**: Custom base URL for OpenAI API (optional)
372
+ - **reasoning_effort**: Reasoning effort for O-series models only - "low", "medium", or "high"
373
+
374
+ **Important Notes:**
375
+
376
+ - O-series models (o1, o1-preview, o1-mini, o3, etc.) use deterministic reasoning and do not support the `temperature` parameter
377
+ - The `reasoning_effort` parameter is only supported by O-series models
378
+ - GPT models support `temperature` but not `reasoning_effort`
379
+ - OpenAI instances default to and ONLY operate as `vibe: true` and use MCP for tool access
380
+ - By default it comes with Claude Code tools, connected with MCP to `claude mcp serve`
381
+ - **Using the responses API requires ruby-openai >= 8.0** - the gem will validate this requirement at runtime
382
+
383
+ ```yaml
384
+ instance_name:
385
+ description: "Specialized agent focused on specific tasks"
386
+ directory: ~/project/path
387
+ model: opus
388
+ connections: [other_instance1, other_instance2]
389
+ prompt: "You are a specialized agent focused on..."
390
+ vibe: false # Set to true to skip all permission checks for this instance
391
+ allowed_tools:
392
+ - Read
393
+ - Edit
394
+ - Write
395
+ - Bash
396
+ - WebFetch
397
+ - WebSearch
398
+ disallowed_tools: # Optional: explicitly deny specific tools
399
+ - "Write(*.log)"
400
+ - "Bash(rm:*)"
401
+ mcps:
402
+ - name: server_name
403
+ type: stdio
404
+ command: command_to_run
405
+ args: ["arg1", "arg2"]
406
+ env:
407
+ VAR1: value1
408
+
409
+ # OpenAI instance examples
410
+
411
+ # GPT model with temperature
412
+ gpt_instance:
413
+ description: "OpenAI GPT-powered creative assistant"
414
+ provider: openai
415
+ model: gpt-4o
416
+ temperature: 0.7 # Supported for GPT models
417
+ api_version: chat_completion
418
+ openai_token_env: OPENAI_API_KEY
419
+ prompt: "You are a creative assistant specializing in content generation"
420
+
421
+ # O-series reasoning model with reasoning_effort
422
+ reasoning_instance:
423
+ description: "OpenAI O-series reasoning assistant"
424
+ provider: openai
425
+ model: o1-mini
426
+ reasoning_effort: medium # Only for O-series models
427
+ api_version: responses # Can use either API version
428
+ prompt: "You are a reasoning assistant for complex problem solving"
429
+ ```
430
+
431
+ ### MCP Server Types
432
+
433
+ #### stdio (Standard I/O)
434
+
435
+ ```yaml
436
+ mcps:
437
+ - name: my_tool
438
+ type: stdio
439
+ command: /path/to/executable
440
+ args: ["--flag", "value"]
441
+ env:
442
+ API_KEY: "secret"
443
+ ```
444
+
445
+ #### sse (Server-Sent Events)
446
+
447
+ ```yaml
448
+ mcps:
449
+ - name: remote_api
450
+ type: sse
451
+ url: "https://api.example.com/mcp"
452
+ headers: # Optional: custom headers for authentication
453
+ Authorization: "Bearer ${API_TOKEN}"
454
+ X-Custom-Header: "value"
455
+ ```
456
+
457
+ #### http (HTTP-based MCP)
458
+
459
+ ```yaml
460
+ mcps:
461
+ - name: http_service
462
+ type: http
463
+ url: "https://api.example.com/mcp-endpoint"
464
+ headers: # Optional: custom headers for authentication
465
+ Authorization: "Bearer ${API_TOKEN}"
466
+ X-API-Key: "${API_KEY}"
467
+ ```
468
+
469
+ ### Hooks Configuration
470
+
471
+ Claude Swarm supports configuring [Claude Code hooks](https://docs.anthropic.com/en/docs/claude-code/hooks) for each instance. Hooks allow you to run custom scripts before/after tools, on prompt submission, and more. Each instance can have its own hooks configuration.
472
+
473
+ #### Supported Hook Events
474
+
475
+ - **PreToolUse**: Run before a tool is executed
476
+ - **PostToolUse**: Run after a tool completes
477
+ - **UserPromptSubmit**: Run when a user prompt is submitted
478
+ - **Stop**: Run when the Claude instance stops
479
+ - **SessionStart**: Run when a session starts
480
+ - **And more...** (see Claude Code hooks documentation)
481
+
482
+ #### Configuration Example
483
+
484
+ ```yaml
485
+ instances:
486
+ lead:
487
+ description: "Lead developer"
488
+ directory: .
489
+ # Hooks configuration follows Claude Code's format exactly
490
+ hooks:
491
+ PreToolUse:
492
+ - matcher: "Write|Edit"
493
+ hooks:
494
+ - type: "command"
495
+ command: "$CLAUDE_PROJECT_DIR/.claude/hooks/validate-code.py"
496
+ timeout: 10
497
+ PostToolUse:
498
+ - matcher: "Bash"
499
+ hooks:
500
+ - type: "command"
501
+ command: "echo 'Bash executed by ${INSTANCE_NAME}' >> ${LOG_DIR}/commands.log"
502
+ UserPromptSubmit:
503
+ - hooks:
504
+ - type: "command"
505
+ command: "${HOOKS_DIR:=$CLAUDE_PROJECT_DIR/.claude/hooks}/add-context.py"
506
+ frontend:
507
+ description: "Frontend developer"
508
+ directory: ./frontend
509
+ hooks:
510
+ PreToolUse:
511
+ - matcher: "Write"
512
+ hooks:
513
+ - type: "command"
514
+ command: "npm run lint"
515
+ timeout: 5
516
+ ```
517
+
518
+ #### How It Works
519
+
520
+ 1. Define hooks in your instance configuration using the exact format expected by Claude Code
521
+ 2. Claude Swarm generates a `settings.json` file for each instance with hooks
522
+ 3. The settings file is passed to Claude Code SDK via the `--settings` parameter
523
+ 4. Each instance runs with its own hooks configuration
524
+
525
+ #### Environment Variables in Hooks
526
+
527
+ Hooks have access to standard Claude Code environment variables plus:
528
+
529
+ - `$CLAUDE_PROJECT_DIR` - The project directory
530
+ - `$CLAUDE_SWARM_SESSION_DIR` - The swarm session directory
531
+ - `$CLAUDE_SWARM_INSTANCE_NAME` - The name of the current instance
532
+
533
+ ### Tools
534
+
535
+ Specify which tools each instance can use:
536
+
537
+ ```yaml
538
+ allowed_tools:
539
+ - Bash # Command execution
540
+ - Edit # File editing
541
+ - Write # File creation
542
+ - Read # File reading
543
+ - WebFetch # Fetch web content
544
+ - WebSearch # Search the web
545
+
546
+ # Note: Pattern-based tool restrictions have been deprecated.
547
+ # Use allowed_tools and disallowed_tools with tool names only.
548
+ ```
549
+
550
+ Tools are passed to Claude using the `--allowedTools` and `--disallowedTools` flags with comma-separated values. Disallowed tools take precedence over allowed tools.
551
+
552
+ #### Available Tools
553
+
554
+ ```yaml
555
+ allowed_tools:
556
+ - Read # File reading
557
+ - Edit # File editing
558
+ - Write # File creation
559
+ - Bash # Command execution
560
+ - WebFetch # Fetch web content
561
+ - WebSearch # Search the web
562
+ ```
563
+
564
+ ### Examples
565
+
566
+ #### Full Stack Development Team
567
+
568
+ ```yaml
569
+ version: 1
570
+ swarm:
571
+ name: "Full Stack Team"
572
+ main: architect
573
+ instances:
574
+ architect:
575
+ description: "Lead architect responsible for system design and code quality"
576
+ directory: .
577
+ model: opus
578
+ connections: [frontend, backend, devops]
579
+ prompt: "You are the lead architect responsible for system design and code quality"
580
+ allowed_tools:
581
+ - Read
582
+ - Edit
583
+ - WebSearch
584
+
585
+ frontend:
586
+ description: "Frontend developer specializing in React and TypeScript"
587
+ directory: ./frontend
588
+ model: opus
589
+ connections: [architect]
590
+ prompt: "You specialize in React, TypeScript, and modern frontend development"
591
+ allowed_tools:
592
+ - Edit
593
+ - Write
594
+ - Bash
595
+
596
+ backend:
597
+ description: "Backend developer building APIs and services"
598
+ directory: ./backend
599
+ model: opus
600
+ connections: [database]
601
+ allowed_tools:
602
+ - Edit
603
+ - Write
604
+ - Bash
605
+
606
+ database:
607
+ description: "Database administrator managing data persistence"
608
+ directory: ./db
609
+ model: sonnet
610
+ allowed_tools:
611
+ - Read
612
+ - Bash
613
+
614
+ devops:
615
+ description: "DevOps engineer handling deployment and infrastructure"
616
+ directory: .
617
+ model: opus
618
+ connections: [architect]
619
+ allowed_tools:
620
+ - Read
621
+ - Edit
622
+ - Bash
623
+ ```
624
+
625
+ #### Research Team with External Tools
626
+
627
+ ```yaml
628
+ version: 1
629
+ swarm:
630
+ name: "Research Team"
631
+ main: lead_researcher
632
+ instances:
633
+ lead_researcher:
634
+ description: "Lead researcher coordinating analysis and documentation"
635
+ directory: ~/research
636
+ model: opus
637
+ connections: [data_analyst, writer]
638
+ allowed_tools:
639
+ - Read
640
+ - WebSearch
641
+ - WebFetch
642
+ mcps:
643
+ - name: arxiv
644
+ type: sse
645
+ url: "https://arxiv-mcp.example.com"
646
+
647
+ data_analyst:
648
+ description: "Data analyst processing research data and statistics"
649
+ directory: ~/research/data
650
+ model: opus
651
+ allowed_tools:
652
+ - Read
653
+ - Write
654
+ - Bash
655
+ mcps:
656
+ - name: jupyter
657
+ type: stdio
658
+ command: jupyter-mcp
659
+ args: ["--notebook-dir", "."]
660
+
661
+ writer:
662
+ description: "Technical writer preparing research documentation"
663
+ directory: ~/research/papers
664
+ model: opus
665
+ allowed_tools:
666
+ - Edit
667
+ - Write
668
+ - Read
669
+ ```
670
+
671
+ #### Multi-Directory Support
672
+
673
+ Instances can have access to multiple directories using an array (uses `claude --add-dir`):
674
+
675
+ ```yaml
676
+ version: 1
677
+ swarm:
678
+ name: "Multi-Module Project"
679
+ main: fullstack_dev
680
+ instances:
681
+ fullstack_dev:
682
+ description: "Full-stack developer working across multiple modules"
683
+ directory: [./frontend, ./backend, ./shared] # Access to multiple directories
684
+ model: opus
685
+ allowed_tools: [Read, Edit, Write, Bash]
686
+ prompt: "You work across frontend, backend, and shared code modules"
687
+
688
+ documentation_writer:
689
+ description: "Documentation specialist with access to code and docs"
690
+ directory: ["./docs", "./src", "./examples"] # Multiple directories as array
691
+ model: sonnet
692
+ allowed_tools: [Read, Write, Edit]
693
+ prompt: "You maintain documentation based on code and examples"
694
+ ```
695
+
696
+ When using multiple directories:
697
+
698
+ - The first directory in the array is the primary working directory
699
+ - Additional directories are accessible via the `--add-dir` flag in Claude
700
+ - All directories must exist or the configuration will fail validation
701
+
702
+ #### Mixed AI Provider Team
703
+
704
+ Combine Claude and OpenAI instances in a single swarm:
705
+
706
+ ```yaml
707
+ version: 1
708
+ swarm:
709
+ name: "Mixed AI Development Team"
710
+ main: lead_developer
711
+ instances:
712
+ lead_developer:
713
+ description: "Claude lead developer coordinating the team"
714
+ directory: .
715
+ model: opus
716
+ connections: [creative_assistant, reasoning_expert, backend_dev]
717
+ prompt: "You are the lead developer coordinating a mixed AI team"
718
+ allowed_tools: [Read, Edit, Bash, Write]
719
+
720
+ creative_assistant:
721
+ description: "OpenAI-powered assistant for creative and UI/UX tasks"
722
+ provider: openai
723
+ model: gpt-4o
724
+ temperature: 0.7 # Supported for GPT models
725
+ directory: ./frontend
726
+ prompt: "You are a creative frontend developer specializing in UI/UX design"
727
+ # OpenAI instances default to vibe: true
728
+
729
+ reasoning_expert:
730
+ description: "OpenAI O-series model for complex problem solving"
731
+ provider: openai
732
+ model: o1-mini
733
+ reasoning_effort: high # For O-series models only
734
+ directory: ./architecture
735
+ prompt: "You solve complex architectural and algorithmic problems"
736
+
737
+ backend_dev:
738
+ description: "Claude backend developer for system architecture"
739
+ directory: ./backend
740
+ model: sonnet
741
+ prompt: "You specialize in backend development and system architecture"
742
+ allowed_tools: [Read, Edit, Write, Bash]
743
+ ```
744
+
745
+ Note: OpenAI instances require the API key to be set in the environment variable (default: `OPENAI_API_KEY`).
746
+
747
+ #### Before and After Commands
748
+
749
+ You can specify commands to run before launching and after exiting the swarm using the `before` and `after` fields:
750
+
751
+ ```yaml
752
+ version: 1
753
+ swarm:
754
+ name: "Development Environment"
755
+ main: lead_developer
756
+ before:
757
+ - "echo '🚀 Setting up development environment...'"
758
+ - "npm install"
759
+ - "docker-compose up -d"
760
+ - "bundle install"
761
+ after:
762
+ - "echo '🛑 Cleaning up development environment...'"
763
+ - "docker-compose down"
764
+ - "rm -rf temp/*"
765
+ instances:
766
+ lead_developer:
767
+ description: "Lead developer coordinating the team"
768
+ directory: .
769
+ model: opus
770
+ allowed_tools: [Read, Edit, Write, Bash]
771
+ ```
772
+
773
+ The `before` commands:
774
+
775
+ - Are executed in sequence before launching any Claude instances
776
+ - Execute in the main instance's directory (including worktree if enabled)
777
+ - Must all succeed for the swarm to launch (exit code 0)
778
+ - Are only executed on initial swarm launch, not when restoring sessions
779
+ - Have their output logged to the session log file
780
+ - Will abort the swarm launch if any command fails
781
+
782
+ The `after` commands:
783
+
784
+ - Are executed after Claude exits but before cleanup processes
785
+ - Execute in the main instance's directory (including worktree if enabled)
786
+ - Run even when the swarm is interrupted by signals (Ctrl+C)
787
+ - Failures do not prevent cleanup from proceeding
788
+ - Are only executed on initial swarm runs, not when restoring sessions
789
+ - Have their output logged to the session log file
790
+
791
+ This is useful for:
792
+
793
+ - Installing dependencies in the isolated worktree environment
794
+ - Starting required services (databases, Docker containers, etc.)
795
+ - Setting up the development environment
796
+ - Running any prerequisite setup scripts
797
+ - Ensuring setup commands affect only the working directory, not the original repository
798
+
799
+ #### Mixed Permission Modes
800
+
801
+ You can have different permission modes for different instances:
802
+
803
+ ```yaml
804
+ version: 1
805
+ swarm:
806
+ name: "Mixed Mode Team"
807
+ main: lead
808
+ instances:
809
+ lead:
810
+ description: "Lead with full permissions"
811
+ directory: .
812
+ model: opus
813
+ vibe: true # This instance runs with --dangerously-skip-permissions
814
+ connections: [restricted_worker, trusted_worker]
815
+
816
+ restricted_worker:
817
+ description: "Worker with restricted permissions"
818
+ directory: ./sensitive
819
+ model: sonnet
820
+ allowed_tools: [Read, Bash] # Allow read and bash commands
821
+
822
+ trusted_worker:
823
+ description: "Trusted worker with more permissions"
824
+ directory: ./workspace
825
+ model: sonnet
826
+ vibe: true # This instance also skips permissions
827
+ allowed_tools: [] # Tools list ignored when vibe: true
828
+ ```
829
+
830
+ #### Git Worktrees
831
+
832
+ Claude Swarm supports running instances in Git worktrees, allowing isolated work without affecting your main repository state. Worktrees are created in an external directory (`~/.claude-swarm/worktrees/`) to ensure proper isolation from the main repository and avoid conflicts with bundler and other tools.
833
+
834
+ **Example Structure:**
835
+
836
+ ```
837
+ ~/.claude-swarm/worktrees/
838
+ └── [session_id]/
839
+ ├── my-repo-[hash]/
840
+ │ └── feature-x/ (worktree for feature-x branch)
841
+ └── other-repo-[hash]/
842
+ └── feature-x/ (worktree for feature-x branch)
843
+ ```
844
+
845
+ **CLI Option:**
846
+
847
+ ```bash
848
+ # Create worktrees with auto-generated name (worktree-SESSION_ID)
849
+ claude-swarm --worktree
850
+
851
+ # Create worktrees with custom name
852
+ claude-swarm --worktree feature-branch
853
+
854
+ # Short form
855
+ claude-swarm -w
856
+ ```
857
+
858
+ **Per-Instance Configuration:**
859
+
860
+ ```yaml
861
+ version: 1
862
+ swarm:
863
+ name: "Worktree Example"
864
+ main: lead
865
+ instances:
866
+ lead:
867
+ description: "Lead developer"
868
+ directory: .
869
+ worktree: true # Use shared worktree name from CLI (or auto-generate)
870
+
871
+ testing:
872
+ description: "Test developer"
873
+ directory: ./tests
874
+ worktree: false # Don't use worktree for this instance
875
+
876
+ feature_dev:
877
+ description: "Feature developer"
878
+ directory: ./features
879
+ worktree: "feature-x" # Use specific worktree name
880
+ ```
881
+
882
+ **Worktree Behavior:**
883
+
884
+ - `worktree: true` - Uses the shared worktree name (from CLI or auto-generated)
885
+ - `worktree: false` - Disables worktree for this instance
886
+ - `worktree: "name"` - Uses a specific worktree name
887
+ - Omitted - Follows CLI behavior (use worktree if `--worktree` is specified)
888
+
889
+ **Notes:**
890
+
891
+ - Auto-generated worktree names use the session ID (e.g., `worktree-20241206_143022`)
892
+ - This makes it easy to correlate worktrees with their Claude Swarm sessions
893
+ - Worktrees are stored externally in `~/.claude-swarm/worktrees/[session_id]/`
894
+ - All worktrees are automatically cleaned up when the swarm exits
895
+ - Worktrees with the same name across different repositories share that name
896
+ - Non-Git directories are unaffected by worktree settings
897
+ - Existing worktrees with the same name are reused
898
+ - The `claude-swarm clean` command also removes orphaned worktrees
899
+
900
+ ### Command Line Options
901
+
902
+ ```bash
903
+ # Use default claude-swarm.yml in current directory
904
+ claude-swarm
905
+
906
+ # Specify a different configuration file
907
+ claude-swarm start my-swarm.yml
908
+ claude-swarm start team-config.yml
909
+
910
+ # Run with --dangerously-skip-permissions for all instances
911
+ claude-swarm --vibe
912
+
913
+ # Run in non-interactive mode with a prompt
914
+ claude-swarm -p "Implement the new user authentication feature"
915
+ claude-swarm --prompt "Fix the bug in the payment module"
916
+
917
+ # Run in interactive mode with an initial prompt
918
+ claude-swarm -i "Review the codebase and suggest improvements"
919
+ claude-swarm --interactive "Help me debug this test failure"
920
+
921
+ # Use a custom session ID instead of auto-generated UUID
922
+ claude-swarm --session-id my-custom-session-123
923
+
924
+ # Stream logs to stdout in prompt mode
925
+ claude-swarm -p "Fix the tests" --stream-logs
926
+
927
+ # Run all instances in Git worktrees
928
+ claude-swarm --worktree # Auto-generated name (worktree-SESSION_ID)
929
+ claude-swarm --worktree feature-branch # Custom worktree name
930
+ claude-swarm -w # Short form
931
+
932
+ # Initialize a new configuration file
933
+ claude-swarm init
934
+ claude-swarm init --force # Overwrite existing file
935
+
936
+ # Generate configuration interactively with Claude's help
937
+ claude-swarm generate # Claude names file based on swarm function
938
+ claude-swarm generate -o my-swarm.yml # Custom output file
939
+ claude-swarm generate --model opus # Use a specific model
940
+
941
+ # Show version
942
+ claude-swarm version
943
+
944
+ # Note: The permission MCP server has been deprecated.
945
+ # Tool permissions are now handled through allowed_tools and disallowed_tools in your configuration.
946
+
947
+ # Internal command for MCP server (used by connected instances)
948
+ claude-swarm mcp-serve INSTANCE_NAME --config CONFIG_FILE --session-timestamp TIMESTAMP
949
+ ```
950
+
951
+ ### Session Monitoring
952
+
953
+ Claude Swarm provides commands to monitor and inspect running sessions:
954
+
955
+ ```bash
956
+ # List running swarm sessions with costs and uptime
957
+ claude-swarm ps
958
+
959
+ # Show detailed information about a session including instance hierarchy
960
+ claude-swarm show 20250617_235233
961
+
962
+ # Watch live logs from a session
963
+ claude-swarm watch 20250617_235233
964
+
965
+ # Watch logs starting from the last 50 lines
966
+ claude-swarm watch 20250617_235233 -n 50
967
+
968
+ # List all available sessions (including completed ones)
969
+ claude-swarm list-sessions
970
+ claude-swarm list-sessions --limit 20
971
+
972
+ # Clean up stale session symlinks and orphaned worktrees
973
+ claude-swarm clean
974
+
975
+ # Remove sessions and worktrees older than 30 days
976
+ claude-swarm clean --days 30
977
+ ```
978
+
979
+ Example output from `claude-swarm ps`:
980
+
981
+ ```
982
+ ⚠️ Total cost does not include the cost of the main instance
983
+
984
+ SESSION_ID SWARM_NAME TOTAL_COST UPTIME DIRECTORY
985
+ -------------------------------------------------------------------------------
986
+ 20250617_235233 Feature Development $0.3847 15m .
987
+ 20250617_143022 Bug Investigation $1.2156 1h .
988
+ 20250617_091547 Multi-Module Dev $0.8932 30m ./frontend, ./backend, ./shared
989
+ ```
990
+
991
+ Note: The total cost shown reflects only the costs of connected instances called via MCP. The main instance cost is not tracked when running interactively.
992
+
993
+ Example output from `claude-swarm show`:
994
+
995
+ ```
996
+ Session: 20250617_235233
997
+ Swarm: Feature Development
998
+ Total Cost: $0.3847 (excluding main instance)
999
+ Start Directory: /Users/paulo/project
1000
+
1001
+ Instance Hierarchy:
1002
+ --------------------------------------------------
1003
+ ├─ orchestrator [main] (orchestrator_e85036fc)
1004
+ Cost: n/a (interactive) | Calls: 0
1005
+ └─ test_archaeologist (test_archaeologist_c504ca5f)
1006
+ Cost: $0.1925 | Calls: 1
1007
+ └─ pr_analyst (pr_analyst_bfbefe56)
1008
+ Cost: $0.1922 | Calls: 1
1009
+
1010
+ Note: Main instance (orchestrator) cost is not tracked in interactive mode.
1011
+ View costs directly in the Claude interface.
1012
+ ```
1013
+
1014
+ ### Session Management and Restoration (Experimental)
1015
+
1016
+ Claude Swarm provides experimental session management with restoration capabilities. **Note: This feature is experimental and has limitations - the main instance's conversation context is not fully restored.**
1017
+
1018
+ #### Session Structure
1019
+
1020
+ All session files are organized in `~/.claude-swarm/sessions/{project}/{timestamp}/`:
1021
+
1022
+ - `config.yml`: Copy of the original swarm configuration
1023
+ - `state/`: Directory containing individual instance states
1024
+ - `{instance_id}.json`: Claude session ID and status for each instance (e.g., `lead_abc123.json`)
1025
+ - `{instance_name}.mcp.json`: MCP configuration files
1026
+ - `session.log`: Human-readable request/response tracking
1027
+ - `session.log.json`: All events in JSONL format (one JSON per line)
1028
+
1029
+ # Note: permissions.log is no longer generated as the permission MCP server has been deprecated
1030
+
1031
+ #### Listing Sessions
1032
+
1033
+ View your previous Claude Swarm sessions:
1034
+
1035
+ ```bash
1036
+ # List recent sessions (default: 10)
1037
+ claude-swarm list-sessions
1038
+
1039
+ # List more sessions
1040
+ claude-swarm list-sessions --limit 20
1041
+ ```
1042
+
1043
+ Output shows:
1044
+
1045
+ - Session ID (timestamp)
1046
+ - Creation time
1047
+ - Main instance name
1048
+ - Number of instances
1049
+ - Configuration file used
1050
+ - Full session path
1051
+
1052
+ #### Resuming Sessions
1053
+
1054
+ Resume a previous session with all instances restored to their Claude session states:
1055
+
1056
+ ```bash
1057
+ # Restore using the session's UUID
1058
+ claude-swarm restore 550e8400-e29b-41d4-a716-446655440000
1059
+ ```
1060
+
1061
+ This will:
1062
+
1063
+ 1. Load the session manifest and instance states
1064
+ 2. Restore the original swarm configuration
1065
+ 3. Resume the main instance with its Claude session ID
1066
+ 4. Restore all connected instances with their session IDs
1067
+ 5. Maintain the same working directories and tool permissions
1068
+
1069
+ #### How Session Restoration Works
1070
+
1071
+ - Each instance's Claude session ID is automatically captured and persisted
1072
+ - Instance states are stored in separate files named by instance ID to prevent concurrency issues
1073
+ - MCP configurations are regenerated with the saved session IDs
1074
+ - The main instance uses Claude's `--resume` flag (limited effectiveness)
1075
+ - Connected instances receive their session IDs via `--claude-session-id`
1076
+
1077
+ **Important Limitations:**
1078
+
1079
+ - The main instance's conversation history and context are not fully restored
1080
+ - Only the session ID is preserved, not the actual conversation state
1081
+ - Connected instances restore more reliably than the main instance
1082
+ - This is an experimental feature and may not work as expected
1083
+
1084
+ ## How It Works
1085
+
1086
+ 1. **Configuration Parsing**: Claude Swarm reads your YAML configuration and validates it
1087
+ 2. **MCP Generation**: For each instance, it generates an MCP configuration file that includes:
1088
+ - Any explicitly defined MCP servers
1089
+ - MCP servers for each connected instance (using `claude-swarm mcp-serve`)
1090
+ 3. **Tool Permissions**: Claude Swarm manages tool permissions through configuration:
1091
+ - Each instance's `allowed_tools` specifies which tools it can use
1092
+ - Connected instances are accessible via `mcp__<instance_name>__*` pattern
1093
+ - Disallowed tools take precedence over allowed tools for fine-grained control
1094
+ - Per-instance `vibe: true` skips all permission checks for that specific instance
1095
+ 4. **Session Persistence**: Claude Swarm automatically tracks session state:
1096
+ - Generates a shared session path for all instances
1097
+ - Each instance's Claude session ID is captured and saved
1098
+ - Instance states are stored using instance IDs as filenames to avoid conflicts
1099
+ - Sessions can be fully restored with all instances reconnected
1100
+ 5. **Main Instance Launch**: The main instance is launched with its MCP configuration, giving it access to all connected instances
1101
+ 6. **Inter-Instance Communication**: Connected instances expose themselves as MCP servers with these tools:
1102
+ - **task**: Execute tasks using Claude Code with configurable tools and return results. The tool description includes the instance name and description (e.g., "Execute a task using Agent frontend_dev. Frontend developer specializing in React and TypeScript")
1103
+ - **session_info**: Get current Claude session information including ID and working directory
1104
+ - **reset_session**: Reset the Claude session for a fresh start
1105
+
1106
+ ## Troubleshooting
1107
+
1108
+ ### Common Issues
1109
+
1110
+ **"Configuration file not found"**
1111
+
1112
+ - Ensure `claude-swarm.yml` exists in the current directory
1113
+ - Or specify the path with `--config`
1114
+
1115
+ **"Main instance not found in instances"**
1116
+
1117
+ - Check that your `main:` field references a valid instance key
1118
+
1119
+ **"Unknown instance in connections"**
1120
+
1121
+ - Verify all instances in `connections:` arrays are defined
1122
+
1123
+ **Permission Errors**
1124
+
1125
+ - Ensure Claude CLI is properly installed and accessible
1126
+ - Check directory permissions for specified paths
1127
+
1128
+ ### Debug Output
1129
+
1130
+ The swarm will display:
1131
+
1132
+ - Session directory location (`~/.claude-swarm/sessions/{project}/{timestamp}/`)
1133
+ - Main instance details (model, directory, tools, connections)
1134
+ - The exact command being run
1135
+
1136
+ ### Session Files
1137
+
1138
+ Check the session directory `~/.claude-swarm/sessions/{project}/{session-id}/` for:
1139
+
1140
+ - `session.log`: Human-readable logs with request/response tracking
1141
+ - `session.log.json`: All events in JSONL format (one JSON object per line)
1142
+ - `{instance}.mcp.json`: MCP configuration for each instance
1143
+ - All files for a session are kept together for easy review
1144
+
1145
+ ## Architecture
1146
+
1147
+ Claude Swarm consists of these core components:
1148
+
1149
+ - **ClaudeSwarm::CLI** (`cli.rb`): Thor-based command-line interface with `start` and `mcp-serve` commands
1150
+ - **ClaudeSwarm::Configuration** (`configuration.rb`): YAML parser and validator with path expansion
1151
+ - **ClaudeSwarm::McpGenerator** (`mcp_generator.rb`): Generates MCP JSON configs for each instance
1152
+ - **ClaudeSwarm::Orchestrator** (`orchestrator.rb`): Launches the main Claude instance with shared session management
1153
+ - **ClaudeSwarm::ClaudeCodeExecutor** (`claude_code_executor.rb`): Executor for Claude Code with session persistence
1154
+ - **ClaudeSwarm::ClaudeMcpServer** (`claude_mcp_server.rb`): FastMCP-based server providing task execution, session info, and reset capabilities
1155
+
1156
+ ## Development
1157
+
1158
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
1159
+
1160
+ To install this gem onto your local machine, run `bundle exec rake install`.
1161
+
1162
+ ### Development Commands
1163
+
1164
+ ```bash
1165
+ bin/setup # Install dependencies
1166
+ rake test # Run the Minitest test suite
1167
+ rake rubocop -A # Run RuboCop linter with auto-fix
1168
+ bin/console # Start IRB session with gem loaded
1169
+ bundle exec rake install # Install gem locally
1170
+ bundle exec rake release # Release gem to RubyGems.org
1171
+ rake # Default: runs both tests and RuboCop
1172
+ ```
1173
+
1174
+ ### Release Process
1175
+
1176
+ The gem is automatically published to RubyGems when a new release is created on GitHub:
1177
+
1178
+ 1. Update the version number in `lib/claude_swarm/version.rb`
1179
+ 2. Update `CHANGELOG.md` with the new version's changes
1180
+ 3. Commit the changes: `git commit -am "Bump version to x.y.z"`
1181
+ 4. Create a version tag: `git tag -a vx.y.z -m "Release version x.y.z"`
1182
+ 5. Push the changes and tag: `git push && git push --tags`
1183
+ 6. The GitHub workflow will create a draft release - review and publish it
1184
+ 7. Once published, the gem will be automatically built and pushed to RubyGems
1185
+
1186
+ **Note**: You need to set up the `RUBYGEMS_AUTH_TOKEN` secret in your GitHub repository settings with your RubyGems API key.
1187
+
1188
+ ## Contributing
1189
+
1190
+ Bug reports and pull requests are welcome on GitHub at https://github.com/parruda/claude-swarm.
1191
+
1192
+ ## License
1193
+
1194
+ The gem is available as open source under the terms of the [MIT License](LICENSE).
1195
+