claude_swarm 1.0.1 → 1.0.4
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.
- checksums.yaml +4 -4
- data/.claude/commands/release.md +1 -1
- data/.claude/hooks/lint-code-files.rb +65 -0
- data/.rubocop.yml +22 -2
- data/CHANGELOG.md +14 -1
- data/CLAUDE.md +1 -1
- data/CONTRIBUTING.md +69 -0
- data/README.md +27 -2
- data/Rakefile +71 -3
- data/analyze_coverage.rb +94 -0
- data/docs/v2/CHANGELOG.swarm_cli.md +43 -0
- data/docs/v2/CHANGELOG.swarm_memory.md +379 -0
- data/docs/v2/CHANGELOG.swarm_sdk.md +362 -0
- data/docs/v2/README.md +308 -0
- data/docs/v2/guides/claude-code-agents.md +262 -0
- data/docs/v2/guides/complete-tutorial.md +3088 -0
- data/docs/v2/guides/getting-started.md +1456 -0
- data/docs/v2/guides/memory-adapters.md +998 -0
- data/docs/v2/guides/plugins.md +816 -0
- data/docs/v2/guides/quick-start-cli.md +1745 -0
- data/docs/v2/guides/rails-integration.md +1902 -0
- data/docs/v2/guides/swarm-memory.md +599 -0
- data/docs/v2/reference/cli.md +729 -0
- data/docs/v2/reference/ruby-dsl.md +2154 -0
- data/docs/v2/reference/yaml.md +1835 -0
- data/docs-team-swarm.yml +2222 -0
- data/examples/learning-assistant/assistant.md +7 -0
- data/examples/learning-assistant/example-memories/concept-example.md +90 -0
- data/examples/learning-assistant/example-memories/experience-example.md +66 -0
- data/examples/learning-assistant/example-memories/fact-example.md +76 -0
- data/examples/learning-assistant/example-memories/memory-index.md +78 -0
- data/examples/learning-assistant/example-memories/skill-example.md +168 -0
- data/examples/learning-assistant/learning_assistant.rb +34 -0
- data/examples/learning-assistant/learning_assistant.yml +20 -0
- data/examples/v2/dsl/01_basic.rb +44 -0
- data/examples/v2/dsl/02_core_parameters.rb +59 -0
- data/examples/v2/dsl/03_capabilities.rb +71 -0
- data/examples/v2/dsl/04_llm_parameters.rb +56 -0
- data/examples/v2/dsl/05_advanced_flags.rb +73 -0
- data/examples/v2/dsl/06_permissions.rb +80 -0
- data/examples/v2/dsl/07_mcp_server.rb +62 -0
- data/examples/v2/dsl/08_swarm_hooks.rb +53 -0
- data/examples/v2/dsl/09_agent_hooks.rb +67 -0
- data/examples/v2/dsl/10_all_agents_hooks.rb +67 -0
- data/examples/v2/dsl/11_delegation.rb +60 -0
- data/examples/v2/dsl/12_complete_integration.rb +137 -0
- data/examples/v2/file_tools_swarm.yml +102 -0
- data/examples/v2/hooks/01_basic_hooks.rb +133 -0
- data/examples/v2/hooks/02_usage_tracking.rb +201 -0
- data/examples/v2/hooks/03_production_monitoring.rb +429 -0
- data/examples/v2/hooks/agent_stop_exit_0.yml +21 -0
- data/examples/v2/hooks/agent_stop_exit_1.yml +21 -0
- data/examples/v2/hooks/agent_stop_exit_2.yml +26 -0
- data/examples/v2/hooks/multiple_hooks_all_pass.yml +37 -0
- data/examples/v2/hooks/multiple_hooks_first_fails.yml +37 -0
- data/examples/v2/hooks/multiple_hooks_second_fails.yml +37 -0
- data/examples/v2/hooks/multiple_hooks_warnings.yml +37 -0
- data/examples/v2/hooks/post_tool_use_exit_0.yml +24 -0
- data/examples/v2/hooks/post_tool_use_exit_1.yml +24 -0
- data/examples/v2/hooks/post_tool_use_exit_2.yml +24 -0
- data/examples/v2/hooks/post_tool_use_multi_matcher_exit_0.yml +26 -0
- data/examples/v2/hooks/post_tool_use_multi_matcher_exit_1.yml +26 -0
- data/examples/v2/hooks/post_tool_use_multi_matcher_exit_2.yml +26 -0
- data/examples/v2/hooks/pre_tool_use_exit_0.yml +24 -0
- data/examples/v2/hooks/pre_tool_use_exit_1.yml +24 -0
- data/examples/v2/hooks/pre_tool_use_exit_2.yml +24 -0
- data/examples/v2/hooks/pre_tool_use_multi_matcher_exit_0.yml +26 -0
- data/examples/v2/hooks/pre_tool_use_multi_matcher_exit_1.yml +26 -0
- data/examples/v2/hooks/pre_tool_use_multi_matcher_exit_2.yml +27 -0
- data/examples/v2/hooks/swarm_summary.sh +44 -0
- data/examples/v2/hooks/user_prompt_exit_0.yml +21 -0
- data/examples/v2/hooks/user_prompt_exit_1.yml +21 -0
- data/examples/v2/hooks/user_prompt_exit_2.yml +21 -0
- data/examples/v2/hooks/validate_bash.rb +59 -0
- data/examples/v2/multi_directory_permissions.yml +221 -0
- data/examples/v2/node_context_demo.rb +127 -0
- data/examples/v2/node_workflow.rb +173 -0
- data/examples/v2/path_resolution_demo.rb +216 -0
- data/examples/v2/simple-swarm-v2.rb +90 -0
- data/examples/v2/simple-swarm-v2.yml +62 -0
- data/examples/v2/swarm.yml +71 -0
- data/examples/v2/swarm_with_hooks.yml +61 -0
- data/examples/v2/swarm_with_hooks_simple.yml +25 -0
- data/examples/v2/think_tool_demo.rb +62 -0
- data/exe/swarm +6 -0
- data/lib/claude_swarm/claude_mcp_server.rb +0 -6
- data/lib/claude_swarm/cli.rb +10 -3
- data/lib/claude_swarm/commands/ps.rb +19 -20
- data/lib/claude_swarm/commands/show.rb +1 -1
- data/lib/claude_swarm/configuration.rb +10 -12
- data/lib/claude_swarm/mcp_generator.rb +10 -1
- data/lib/claude_swarm/orchestrator.rb +73 -49
- data/lib/claude_swarm/system_utils.rb +37 -11
- data/lib/claude_swarm/version.rb +1 -1
- data/lib/claude_swarm/worktree_manager.rb +1 -0
- data/lib/claude_swarm/yaml_loader.rb +22 -0
- data/lib/claude_swarm.rb +7 -2
- data/lib/swarm_cli/cli.rb +201 -0
- data/lib/swarm_cli/command_registry.rb +61 -0
- data/lib/swarm_cli/commands/mcp_serve.rb +130 -0
- data/lib/swarm_cli/commands/mcp_tools.rb +148 -0
- data/lib/swarm_cli/commands/migrate.rb +55 -0
- data/lib/swarm_cli/commands/run.rb +173 -0
- data/lib/swarm_cli/config_loader.rb +97 -0
- data/lib/swarm_cli/formatters/human_formatter.rb +711 -0
- data/lib/swarm_cli/formatters/json_formatter.rb +51 -0
- data/lib/swarm_cli/interactive_repl.rb +918 -0
- data/lib/swarm_cli/mcp_serve_options.rb +44 -0
- data/lib/swarm_cli/mcp_tools_options.rb +59 -0
- data/lib/swarm_cli/migrate_options.rb +54 -0
- data/lib/swarm_cli/migrator.rb +132 -0
- data/lib/swarm_cli/options.rb +151 -0
- data/lib/swarm_cli/ui/components/agent_badge.rb +33 -0
- data/lib/swarm_cli/ui/components/content_block.rb +120 -0
- data/lib/swarm_cli/ui/components/divider.rb +57 -0
- data/lib/swarm_cli/ui/components/panel.rb +62 -0
- data/lib/swarm_cli/ui/components/usage_stats.rb +70 -0
- data/lib/swarm_cli/ui/formatters/cost.rb +49 -0
- data/lib/swarm_cli/ui/formatters/number.rb +58 -0
- data/lib/swarm_cli/ui/formatters/text.rb +77 -0
- data/lib/swarm_cli/ui/formatters/time.rb +73 -0
- data/lib/swarm_cli/ui/icons.rb +59 -0
- data/lib/swarm_cli/ui/renderers/event_renderer.rb +188 -0
- data/lib/swarm_cli/ui/state/agent_color_cache.rb +45 -0
- data/lib/swarm_cli/ui/state/depth_tracker.rb +40 -0
- data/lib/swarm_cli/ui/state/spinner_manager.rb +170 -0
- data/lib/swarm_cli/ui/state/usage_tracker.rb +62 -0
- data/lib/swarm_cli/version.rb +5 -0
- data/lib/swarm_cli.rb +44 -0
- data/lib/swarm_memory/adapters/base.rb +141 -0
- data/lib/swarm_memory/adapters/filesystem_adapter.rb +845 -0
- data/lib/swarm_memory/chat_extension.rb +34 -0
- data/lib/swarm_memory/cli/commands.rb +306 -0
- data/lib/swarm_memory/core/entry.rb +37 -0
- data/lib/swarm_memory/core/frontmatter_parser.rb +108 -0
- data/lib/swarm_memory/core/metadata_extractor.rb +68 -0
- data/lib/swarm_memory/core/path_normalizer.rb +75 -0
- data/lib/swarm_memory/core/semantic_index.rb +244 -0
- data/lib/swarm_memory/core/storage.rb +288 -0
- data/lib/swarm_memory/core/storage_read_tracker.rb +63 -0
- data/lib/swarm_memory/dsl/builder_extension.rb +40 -0
- data/lib/swarm_memory/dsl/memory_config.rb +113 -0
- data/lib/swarm_memory/embeddings/embedder.rb +36 -0
- data/lib/swarm_memory/embeddings/informers_embedder.rb +152 -0
- data/lib/swarm_memory/errors.rb +21 -0
- data/lib/swarm_memory/integration/cli_registration.rb +30 -0
- data/lib/swarm_memory/integration/configuration.rb +43 -0
- data/lib/swarm_memory/integration/registration.rb +31 -0
- data/lib/swarm_memory/integration/sdk_plugin.rb +531 -0
- data/lib/swarm_memory/optimization/analyzer.rb +244 -0
- data/lib/swarm_memory/optimization/defragmenter.rb +863 -0
- data/lib/swarm_memory/prompts/memory.md.erb +109 -0
- data/lib/swarm_memory/prompts/memory_assistant.md.erb +181 -0
- data/lib/swarm_memory/prompts/memory_researcher.md.erb +281 -0
- data/lib/swarm_memory/prompts/memory_retrieval.md.erb +78 -0
- data/lib/swarm_memory/search/semantic_search.rb +112 -0
- data/lib/swarm_memory/search/text_search.rb +42 -0
- data/lib/swarm_memory/search/text_similarity.rb +80 -0
- data/lib/swarm_memory/skills/meta/deep-learning.md +101 -0
- data/lib/swarm_memory/skills/meta/deep-learning.yml +14 -0
- data/lib/swarm_memory/tools/load_skill.rb +313 -0
- data/lib/swarm_memory/tools/memory_defrag.rb +382 -0
- data/lib/swarm_memory/tools/memory_delete.rb +99 -0
- data/lib/swarm_memory/tools/memory_edit.rb +185 -0
- data/lib/swarm_memory/tools/memory_glob.rb +160 -0
- data/lib/swarm_memory/tools/memory_grep.rb +247 -0
- data/lib/swarm_memory/tools/memory_multi_edit.rb +281 -0
- data/lib/swarm_memory/tools/memory_read.rb +123 -0
- data/lib/swarm_memory/tools/memory_write.rb +231 -0
- data/lib/swarm_memory/utils.rb +50 -0
- data/lib/swarm_memory/version.rb +5 -0
- data/lib/swarm_memory.rb +166 -0
- data/lib/swarm_sdk/agent/RETRY_LOGIC.md +127 -0
- data/lib/swarm_sdk/agent/builder.rb +461 -0
- data/lib/swarm_sdk/agent/chat/context_tracker.rb +314 -0
- data/lib/swarm_sdk/agent/chat/hook_integration.rb +372 -0
- data/lib/swarm_sdk/agent/chat/logging_helpers.rb +116 -0
- data/lib/swarm_sdk/agent/chat/system_reminder_injector.rb +152 -0
- data/lib/swarm_sdk/agent/chat.rb +1159 -0
- data/lib/swarm_sdk/agent/context.rb +112 -0
- data/lib/swarm_sdk/agent/context_manager.rb +309 -0
- data/lib/swarm_sdk/agent/definition.rb +556 -0
- data/lib/swarm_sdk/claude_code_agent_adapter.rb +205 -0
- data/lib/swarm_sdk/configuration.rb +296 -0
- data/lib/swarm_sdk/context_compactor/metrics.rb +147 -0
- data/lib/swarm_sdk/context_compactor/token_counter.rb +106 -0
- data/lib/swarm_sdk/context_compactor.rb +340 -0
- data/lib/swarm_sdk/hooks/adapter.rb +359 -0
- data/lib/swarm_sdk/hooks/context.rb +197 -0
- data/lib/swarm_sdk/hooks/definition.rb +80 -0
- data/lib/swarm_sdk/hooks/error.rb +29 -0
- data/lib/swarm_sdk/hooks/executor.rb +146 -0
- data/lib/swarm_sdk/hooks/registry.rb +147 -0
- data/lib/swarm_sdk/hooks/result.rb +150 -0
- data/lib/swarm_sdk/hooks/shell_executor.rb +254 -0
- data/lib/swarm_sdk/hooks/tool_call.rb +35 -0
- data/lib/swarm_sdk/hooks/tool_result.rb +62 -0
- data/lib/swarm_sdk/log_collector.rb +51 -0
- data/lib/swarm_sdk/log_stream.rb +69 -0
- data/lib/swarm_sdk/markdown_parser.rb +75 -0
- data/lib/swarm_sdk/model_aliases.json +5 -0
- data/lib/swarm_sdk/models.json +1 -0
- data/lib/swarm_sdk/models.rb +120 -0
- data/lib/swarm_sdk/node/agent_config.rb +49 -0
- data/lib/swarm_sdk/node/builder.rb +439 -0
- data/lib/swarm_sdk/node/transformer_executor.rb +248 -0
- data/lib/swarm_sdk/node_context.rb +170 -0
- data/lib/swarm_sdk/node_orchestrator.rb +384 -0
- data/lib/swarm_sdk/permissions/config.rb +239 -0
- data/lib/swarm_sdk/permissions/error_formatter.rb +121 -0
- data/lib/swarm_sdk/permissions/path_matcher.rb +35 -0
- data/lib/swarm_sdk/permissions/validator.rb +173 -0
- data/lib/swarm_sdk/permissions_builder.rb +122 -0
- data/lib/swarm_sdk/plugin.rb +147 -0
- data/lib/swarm_sdk/plugin_registry.rb +101 -0
- data/lib/swarm_sdk/prompts/base_system_prompt.md.erb +243 -0
- data/lib/swarm_sdk/providers/openai_with_responses.rb +582 -0
- data/lib/swarm_sdk/result.rb +97 -0
- data/lib/swarm_sdk/swarm/agent_initializer.rb +334 -0
- data/lib/swarm_sdk/swarm/all_agents_builder.rb +140 -0
- data/lib/swarm_sdk/swarm/builder.rb +586 -0
- data/lib/swarm_sdk/swarm/mcp_configurator.rb +151 -0
- data/lib/swarm_sdk/swarm/tool_configurator.rb +419 -0
- data/lib/swarm_sdk/swarm.rb +982 -0
- data/lib/swarm_sdk/tools/bash.rb +274 -0
- data/lib/swarm_sdk/tools/clock.rb +44 -0
- data/lib/swarm_sdk/tools/delegate.rb +164 -0
- data/lib/swarm_sdk/tools/document_converters/base_converter.rb +83 -0
- data/lib/swarm_sdk/tools/document_converters/docx_converter.rb +99 -0
- data/lib/swarm_sdk/tools/document_converters/html_converter.rb +101 -0
- data/lib/swarm_sdk/tools/document_converters/pdf_converter.rb +78 -0
- data/lib/swarm_sdk/tools/document_converters/xlsx_converter.rb +194 -0
- data/lib/swarm_sdk/tools/edit.rb +150 -0
- data/lib/swarm_sdk/tools/glob.rb +158 -0
- data/lib/swarm_sdk/tools/grep.rb +228 -0
- data/lib/swarm_sdk/tools/image_extractors/docx_image_extractor.rb +43 -0
- data/lib/swarm_sdk/tools/image_extractors/pdf_image_extractor.rb +163 -0
- data/lib/swarm_sdk/tools/image_formats/tiff_builder.rb +65 -0
- data/lib/swarm_sdk/tools/multi_edit.rb +232 -0
- data/lib/swarm_sdk/tools/path_resolver.rb +43 -0
- data/lib/swarm_sdk/tools/read.rb +251 -0
- data/lib/swarm_sdk/tools/registry.rb +93 -0
- data/lib/swarm_sdk/tools/scratchpad/scratchpad_list.rb +96 -0
- data/lib/swarm_sdk/tools/scratchpad/scratchpad_read.rb +76 -0
- data/lib/swarm_sdk/tools/scratchpad/scratchpad_write.rb +91 -0
- data/lib/swarm_sdk/tools/stores/read_tracker.rb +61 -0
- data/lib/swarm_sdk/tools/stores/scratchpad_storage.rb +224 -0
- data/lib/swarm_sdk/tools/stores/storage.rb +148 -0
- data/lib/swarm_sdk/tools/stores/todo_manager.rb +65 -0
- data/lib/swarm_sdk/tools/think.rb +95 -0
- data/lib/swarm_sdk/tools/todo_write.rb +216 -0
- data/lib/swarm_sdk/tools/web_fetch.rb +261 -0
- data/lib/swarm_sdk/tools/write.rb +117 -0
- data/lib/swarm_sdk/utils.rb +50 -0
- data/lib/swarm_sdk/version.rb +5 -0
- data/lib/swarm_sdk.rb +157 -0
- data/llm.v2.txt +13407 -0
- data/rubocop/cop/security/no_reflection_methods.rb +47 -0
- data/rubocop/cop/security/no_ruby_llm_logger.rb +32 -0
- data/swarm_cli.gemspec +57 -0
- data/swarm_memory.gemspec +28 -0
- data/swarm_sdk.gemspec +41 -0
- data/team.yml +1 -1
- data/team_full.yml +1875 -0
- data/{team_v2.yml → team_sdk.yml} +121 -52
- metadata +249 -6
- data/EXAMPLES.md +0 -164
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: claude_swarm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Paulo Arruda
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 2025-10-28 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: thor
|
|
@@ -141,18 +141,44 @@ extensions: []
|
|
|
141
141
|
extra_rdoc_files: []
|
|
142
142
|
files:
|
|
143
143
|
- ".claude/commands/release.md"
|
|
144
|
+
- ".claude/hooks/lint-code-files.rb"
|
|
144
145
|
- ".rubocop.yml"
|
|
145
146
|
- ".rubocop_todo.yml"
|
|
146
147
|
- ".ruby-version"
|
|
147
148
|
- CHANGELOG.md
|
|
148
149
|
- CLAUDE.md
|
|
149
|
-
-
|
|
150
|
+
- CONTRIBUTING.md
|
|
150
151
|
- LICENSE
|
|
151
152
|
- README.md
|
|
152
153
|
- RELEASING.md
|
|
153
154
|
- Rakefile
|
|
155
|
+
- analyze_coverage.rb
|
|
154
156
|
- claude-sdk-docs.md
|
|
157
|
+
- docs-team-swarm.yml
|
|
158
|
+
- docs/v2/CHANGELOG.swarm_cli.md
|
|
159
|
+
- docs/v2/CHANGELOG.swarm_memory.md
|
|
160
|
+
- docs/v2/CHANGELOG.swarm_sdk.md
|
|
161
|
+
- docs/v2/README.md
|
|
162
|
+
- docs/v2/guides/claude-code-agents.md
|
|
163
|
+
- docs/v2/guides/complete-tutorial.md
|
|
164
|
+
- docs/v2/guides/getting-started.md
|
|
165
|
+
- docs/v2/guides/memory-adapters.md
|
|
166
|
+
- docs/v2/guides/plugins.md
|
|
167
|
+
- docs/v2/guides/quick-start-cli.md
|
|
168
|
+
- docs/v2/guides/rails-integration.md
|
|
169
|
+
- docs/v2/guides/swarm-memory.md
|
|
170
|
+
- docs/v2/reference/cli.md
|
|
171
|
+
- docs/v2/reference/ruby-dsl.md
|
|
172
|
+
- docs/v2/reference/yaml.md
|
|
155
173
|
- examples/claude-swarm.yml
|
|
174
|
+
- examples/learning-assistant/assistant.md
|
|
175
|
+
- examples/learning-assistant/example-memories/concept-example.md
|
|
176
|
+
- examples/learning-assistant/example-memories/experience-example.md
|
|
177
|
+
- examples/learning-assistant/example-memories/fact-example.md
|
|
178
|
+
- examples/learning-assistant/example-memories/memory-index.md
|
|
179
|
+
- examples/learning-assistant/example-memories/skill-example.md
|
|
180
|
+
- examples/learning-assistant/learning_assistant.rb
|
|
181
|
+
- examples/learning-assistant/learning_assistant.yml
|
|
156
182
|
- examples/microservices-team.yml
|
|
157
183
|
- examples/mixed-provider-swarm.yml
|
|
158
184
|
- examples/monitoring-demo.yml
|
|
@@ -160,8 +186,59 @@ files:
|
|
|
160
186
|
- examples/session-restoration-demo.yml
|
|
161
187
|
- examples/simple-session-hook-swarm.yml
|
|
162
188
|
- examples/test-generation.yml
|
|
189
|
+
- examples/v2/dsl/01_basic.rb
|
|
190
|
+
- examples/v2/dsl/02_core_parameters.rb
|
|
191
|
+
- examples/v2/dsl/03_capabilities.rb
|
|
192
|
+
- examples/v2/dsl/04_llm_parameters.rb
|
|
193
|
+
- examples/v2/dsl/05_advanced_flags.rb
|
|
194
|
+
- examples/v2/dsl/06_permissions.rb
|
|
195
|
+
- examples/v2/dsl/07_mcp_server.rb
|
|
196
|
+
- examples/v2/dsl/08_swarm_hooks.rb
|
|
197
|
+
- examples/v2/dsl/09_agent_hooks.rb
|
|
198
|
+
- examples/v2/dsl/10_all_agents_hooks.rb
|
|
199
|
+
- examples/v2/dsl/11_delegation.rb
|
|
200
|
+
- examples/v2/dsl/12_complete_integration.rb
|
|
201
|
+
- examples/v2/file_tools_swarm.yml
|
|
202
|
+
- examples/v2/hooks/01_basic_hooks.rb
|
|
203
|
+
- examples/v2/hooks/02_usage_tracking.rb
|
|
204
|
+
- examples/v2/hooks/03_production_monitoring.rb
|
|
205
|
+
- examples/v2/hooks/agent_stop_exit_0.yml
|
|
206
|
+
- examples/v2/hooks/agent_stop_exit_1.yml
|
|
207
|
+
- examples/v2/hooks/agent_stop_exit_2.yml
|
|
208
|
+
- examples/v2/hooks/multiple_hooks_all_pass.yml
|
|
209
|
+
- examples/v2/hooks/multiple_hooks_first_fails.yml
|
|
210
|
+
- examples/v2/hooks/multiple_hooks_second_fails.yml
|
|
211
|
+
- examples/v2/hooks/multiple_hooks_warnings.yml
|
|
212
|
+
- examples/v2/hooks/post_tool_use_exit_0.yml
|
|
213
|
+
- examples/v2/hooks/post_tool_use_exit_1.yml
|
|
214
|
+
- examples/v2/hooks/post_tool_use_exit_2.yml
|
|
215
|
+
- examples/v2/hooks/post_tool_use_multi_matcher_exit_0.yml
|
|
216
|
+
- examples/v2/hooks/post_tool_use_multi_matcher_exit_1.yml
|
|
217
|
+
- examples/v2/hooks/post_tool_use_multi_matcher_exit_2.yml
|
|
218
|
+
- examples/v2/hooks/pre_tool_use_exit_0.yml
|
|
219
|
+
- examples/v2/hooks/pre_tool_use_exit_1.yml
|
|
220
|
+
- examples/v2/hooks/pre_tool_use_exit_2.yml
|
|
221
|
+
- examples/v2/hooks/pre_tool_use_multi_matcher_exit_0.yml
|
|
222
|
+
- examples/v2/hooks/pre_tool_use_multi_matcher_exit_1.yml
|
|
223
|
+
- examples/v2/hooks/pre_tool_use_multi_matcher_exit_2.yml
|
|
224
|
+
- examples/v2/hooks/swarm_summary.sh
|
|
225
|
+
- examples/v2/hooks/user_prompt_exit_0.yml
|
|
226
|
+
- examples/v2/hooks/user_prompt_exit_1.yml
|
|
227
|
+
- examples/v2/hooks/user_prompt_exit_2.yml
|
|
228
|
+
- examples/v2/hooks/validate_bash.rb
|
|
229
|
+
- examples/v2/multi_directory_permissions.yml
|
|
230
|
+
- examples/v2/node_context_demo.rb
|
|
231
|
+
- examples/v2/node_workflow.rb
|
|
232
|
+
- examples/v2/path_resolution_demo.rb
|
|
233
|
+
- examples/v2/simple-swarm-v2.rb
|
|
234
|
+
- examples/v2/simple-swarm-v2.yml
|
|
235
|
+
- examples/v2/swarm.yml
|
|
236
|
+
- examples/v2/swarm_with_hooks.yml
|
|
237
|
+
- examples/v2/swarm_with_hooks_simple.yml
|
|
238
|
+
- examples/v2/think_tool_demo.rb
|
|
163
239
|
- examples/with-before-commands.yml
|
|
164
240
|
- exe/claude-swarm
|
|
241
|
+
- exe/swarm
|
|
165
242
|
- lib/claude_swarm.rb
|
|
166
243
|
- lib/claude_swarm/base_executor.rb
|
|
167
244
|
- lib/claude_swarm/claude_code_executor.rb
|
|
@@ -188,15 +265,181 @@ files:
|
|
|
188
265
|
- lib/claude_swarm/tools/task_tool.rb
|
|
189
266
|
- lib/claude_swarm/version.rb
|
|
190
267
|
- lib/claude_swarm/worktree_manager.rb
|
|
268
|
+
- lib/claude_swarm/yaml_loader.rb
|
|
269
|
+
- lib/swarm_cli.rb
|
|
270
|
+
- lib/swarm_cli/cli.rb
|
|
271
|
+
- lib/swarm_cli/command_registry.rb
|
|
272
|
+
- lib/swarm_cli/commands/mcp_serve.rb
|
|
273
|
+
- lib/swarm_cli/commands/mcp_tools.rb
|
|
274
|
+
- lib/swarm_cli/commands/migrate.rb
|
|
275
|
+
- lib/swarm_cli/commands/run.rb
|
|
276
|
+
- lib/swarm_cli/config_loader.rb
|
|
277
|
+
- lib/swarm_cli/formatters/human_formatter.rb
|
|
278
|
+
- lib/swarm_cli/formatters/json_formatter.rb
|
|
279
|
+
- lib/swarm_cli/interactive_repl.rb
|
|
280
|
+
- lib/swarm_cli/mcp_serve_options.rb
|
|
281
|
+
- lib/swarm_cli/mcp_tools_options.rb
|
|
282
|
+
- lib/swarm_cli/migrate_options.rb
|
|
283
|
+
- lib/swarm_cli/migrator.rb
|
|
284
|
+
- lib/swarm_cli/options.rb
|
|
285
|
+
- lib/swarm_cli/ui/components/agent_badge.rb
|
|
286
|
+
- lib/swarm_cli/ui/components/content_block.rb
|
|
287
|
+
- lib/swarm_cli/ui/components/divider.rb
|
|
288
|
+
- lib/swarm_cli/ui/components/panel.rb
|
|
289
|
+
- lib/swarm_cli/ui/components/usage_stats.rb
|
|
290
|
+
- lib/swarm_cli/ui/formatters/cost.rb
|
|
291
|
+
- lib/swarm_cli/ui/formatters/number.rb
|
|
292
|
+
- lib/swarm_cli/ui/formatters/text.rb
|
|
293
|
+
- lib/swarm_cli/ui/formatters/time.rb
|
|
294
|
+
- lib/swarm_cli/ui/icons.rb
|
|
295
|
+
- lib/swarm_cli/ui/renderers/event_renderer.rb
|
|
296
|
+
- lib/swarm_cli/ui/state/agent_color_cache.rb
|
|
297
|
+
- lib/swarm_cli/ui/state/depth_tracker.rb
|
|
298
|
+
- lib/swarm_cli/ui/state/spinner_manager.rb
|
|
299
|
+
- lib/swarm_cli/ui/state/usage_tracker.rb
|
|
300
|
+
- lib/swarm_cli/version.rb
|
|
301
|
+
- lib/swarm_memory.rb
|
|
302
|
+
- lib/swarm_memory/adapters/base.rb
|
|
303
|
+
- lib/swarm_memory/adapters/filesystem_adapter.rb
|
|
304
|
+
- lib/swarm_memory/chat_extension.rb
|
|
305
|
+
- lib/swarm_memory/cli/commands.rb
|
|
306
|
+
- lib/swarm_memory/core/entry.rb
|
|
307
|
+
- lib/swarm_memory/core/frontmatter_parser.rb
|
|
308
|
+
- lib/swarm_memory/core/metadata_extractor.rb
|
|
309
|
+
- lib/swarm_memory/core/path_normalizer.rb
|
|
310
|
+
- lib/swarm_memory/core/semantic_index.rb
|
|
311
|
+
- lib/swarm_memory/core/storage.rb
|
|
312
|
+
- lib/swarm_memory/core/storage_read_tracker.rb
|
|
313
|
+
- lib/swarm_memory/dsl/builder_extension.rb
|
|
314
|
+
- lib/swarm_memory/dsl/memory_config.rb
|
|
315
|
+
- lib/swarm_memory/embeddings/embedder.rb
|
|
316
|
+
- lib/swarm_memory/embeddings/informers_embedder.rb
|
|
317
|
+
- lib/swarm_memory/errors.rb
|
|
318
|
+
- lib/swarm_memory/integration/cli_registration.rb
|
|
319
|
+
- lib/swarm_memory/integration/configuration.rb
|
|
320
|
+
- lib/swarm_memory/integration/registration.rb
|
|
321
|
+
- lib/swarm_memory/integration/sdk_plugin.rb
|
|
322
|
+
- lib/swarm_memory/optimization/analyzer.rb
|
|
323
|
+
- lib/swarm_memory/optimization/defragmenter.rb
|
|
324
|
+
- lib/swarm_memory/prompts/memory.md.erb
|
|
325
|
+
- lib/swarm_memory/prompts/memory_assistant.md.erb
|
|
326
|
+
- lib/swarm_memory/prompts/memory_researcher.md.erb
|
|
327
|
+
- lib/swarm_memory/prompts/memory_retrieval.md.erb
|
|
328
|
+
- lib/swarm_memory/search/semantic_search.rb
|
|
329
|
+
- lib/swarm_memory/search/text_search.rb
|
|
330
|
+
- lib/swarm_memory/search/text_similarity.rb
|
|
331
|
+
- lib/swarm_memory/skills/meta/deep-learning.md
|
|
332
|
+
- lib/swarm_memory/skills/meta/deep-learning.yml
|
|
333
|
+
- lib/swarm_memory/tools/load_skill.rb
|
|
334
|
+
- lib/swarm_memory/tools/memory_defrag.rb
|
|
335
|
+
- lib/swarm_memory/tools/memory_delete.rb
|
|
336
|
+
- lib/swarm_memory/tools/memory_edit.rb
|
|
337
|
+
- lib/swarm_memory/tools/memory_glob.rb
|
|
338
|
+
- lib/swarm_memory/tools/memory_grep.rb
|
|
339
|
+
- lib/swarm_memory/tools/memory_multi_edit.rb
|
|
340
|
+
- lib/swarm_memory/tools/memory_read.rb
|
|
341
|
+
- lib/swarm_memory/tools/memory_write.rb
|
|
342
|
+
- lib/swarm_memory/utils.rb
|
|
343
|
+
- lib/swarm_memory/version.rb
|
|
344
|
+
- lib/swarm_sdk.rb
|
|
345
|
+
- lib/swarm_sdk/agent/RETRY_LOGIC.md
|
|
346
|
+
- lib/swarm_sdk/agent/builder.rb
|
|
347
|
+
- lib/swarm_sdk/agent/chat.rb
|
|
348
|
+
- lib/swarm_sdk/agent/chat/context_tracker.rb
|
|
349
|
+
- lib/swarm_sdk/agent/chat/hook_integration.rb
|
|
350
|
+
- lib/swarm_sdk/agent/chat/logging_helpers.rb
|
|
351
|
+
- lib/swarm_sdk/agent/chat/system_reminder_injector.rb
|
|
352
|
+
- lib/swarm_sdk/agent/context.rb
|
|
353
|
+
- lib/swarm_sdk/agent/context_manager.rb
|
|
354
|
+
- lib/swarm_sdk/agent/definition.rb
|
|
355
|
+
- lib/swarm_sdk/claude_code_agent_adapter.rb
|
|
356
|
+
- lib/swarm_sdk/configuration.rb
|
|
357
|
+
- lib/swarm_sdk/context_compactor.rb
|
|
358
|
+
- lib/swarm_sdk/context_compactor/metrics.rb
|
|
359
|
+
- lib/swarm_sdk/context_compactor/token_counter.rb
|
|
360
|
+
- lib/swarm_sdk/hooks/adapter.rb
|
|
361
|
+
- lib/swarm_sdk/hooks/context.rb
|
|
362
|
+
- lib/swarm_sdk/hooks/definition.rb
|
|
363
|
+
- lib/swarm_sdk/hooks/error.rb
|
|
364
|
+
- lib/swarm_sdk/hooks/executor.rb
|
|
365
|
+
- lib/swarm_sdk/hooks/registry.rb
|
|
366
|
+
- lib/swarm_sdk/hooks/result.rb
|
|
367
|
+
- lib/swarm_sdk/hooks/shell_executor.rb
|
|
368
|
+
- lib/swarm_sdk/hooks/tool_call.rb
|
|
369
|
+
- lib/swarm_sdk/hooks/tool_result.rb
|
|
370
|
+
- lib/swarm_sdk/log_collector.rb
|
|
371
|
+
- lib/swarm_sdk/log_stream.rb
|
|
372
|
+
- lib/swarm_sdk/markdown_parser.rb
|
|
373
|
+
- lib/swarm_sdk/model_aliases.json
|
|
374
|
+
- lib/swarm_sdk/models.json
|
|
375
|
+
- lib/swarm_sdk/models.rb
|
|
376
|
+
- lib/swarm_sdk/node/agent_config.rb
|
|
377
|
+
- lib/swarm_sdk/node/builder.rb
|
|
378
|
+
- lib/swarm_sdk/node/transformer_executor.rb
|
|
379
|
+
- lib/swarm_sdk/node_context.rb
|
|
380
|
+
- lib/swarm_sdk/node_orchestrator.rb
|
|
381
|
+
- lib/swarm_sdk/permissions/config.rb
|
|
382
|
+
- lib/swarm_sdk/permissions/error_formatter.rb
|
|
383
|
+
- lib/swarm_sdk/permissions/path_matcher.rb
|
|
384
|
+
- lib/swarm_sdk/permissions/validator.rb
|
|
385
|
+
- lib/swarm_sdk/permissions_builder.rb
|
|
386
|
+
- lib/swarm_sdk/plugin.rb
|
|
387
|
+
- lib/swarm_sdk/plugin_registry.rb
|
|
388
|
+
- lib/swarm_sdk/prompts/base_system_prompt.md.erb
|
|
389
|
+
- lib/swarm_sdk/providers/openai_with_responses.rb
|
|
390
|
+
- lib/swarm_sdk/result.rb
|
|
391
|
+
- lib/swarm_sdk/swarm.rb
|
|
392
|
+
- lib/swarm_sdk/swarm/agent_initializer.rb
|
|
393
|
+
- lib/swarm_sdk/swarm/all_agents_builder.rb
|
|
394
|
+
- lib/swarm_sdk/swarm/builder.rb
|
|
395
|
+
- lib/swarm_sdk/swarm/mcp_configurator.rb
|
|
396
|
+
- lib/swarm_sdk/swarm/tool_configurator.rb
|
|
397
|
+
- lib/swarm_sdk/tools/bash.rb
|
|
398
|
+
- lib/swarm_sdk/tools/clock.rb
|
|
399
|
+
- lib/swarm_sdk/tools/delegate.rb
|
|
400
|
+
- lib/swarm_sdk/tools/document_converters/base_converter.rb
|
|
401
|
+
- lib/swarm_sdk/tools/document_converters/docx_converter.rb
|
|
402
|
+
- lib/swarm_sdk/tools/document_converters/html_converter.rb
|
|
403
|
+
- lib/swarm_sdk/tools/document_converters/pdf_converter.rb
|
|
404
|
+
- lib/swarm_sdk/tools/document_converters/xlsx_converter.rb
|
|
405
|
+
- lib/swarm_sdk/tools/edit.rb
|
|
406
|
+
- lib/swarm_sdk/tools/glob.rb
|
|
407
|
+
- lib/swarm_sdk/tools/grep.rb
|
|
408
|
+
- lib/swarm_sdk/tools/image_extractors/docx_image_extractor.rb
|
|
409
|
+
- lib/swarm_sdk/tools/image_extractors/pdf_image_extractor.rb
|
|
410
|
+
- lib/swarm_sdk/tools/image_formats/tiff_builder.rb
|
|
411
|
+
- lib/swarm_sdk/tools/multi_edit.rb
|
|
412
|
+
- lib/swarm_sdk/tools/path_resolver.rb
|
|
413
|
+
- lib/swarm_sdk/tools/read.rb
|
|
414
|
+
- lib/swarm_sdk/tools/registry.rb
|
|
415
|
+
- lib/swarm_sdk/tools/scratchpad/scratchpad_list.rb
|
|
416
|
+
- lib/swarm_sdk/tools/scratchpad/scratchpad_read.rb
|
|
417
|
+
- lib/swarm_sdk/tools/scratchpad/scratchpad_write.rb
|
|
418
|
+
- lib/swarm_sdk/tools/stores/read_tracker.rb
|
|
419
|
+
- lib/swarm_sdk/tools/stores/scratchpad_storage.rb
|
|
420
|
+
- lib/swarm_sdk/tools/stores/storage.rb
|
|
421
|
+
- lib/swarm_sdk/tools/stores/todo_manager.rb
|
|
422
|
+
- lib/swarm_sdk/tools/think.rb
|
|
423
|
+
- lib/swarm_sdk/tools/todo_write.rb
|
|
424
|
+
- lib/swarm_sdk/tools/web_fetch.rb
|
|
425
|
+
- lib/swarm_sdk/tools/write.rb
|
|
426
|
+
- lib/swarm_sdk/utils.rb
|
|
427
|
+
- lib/swarm_sdk/version.rb
|
|
428
|
+
- llm.v2.txt
|
|
191
429
|
- llms.txt
|
|
430
|
+
- rubocop/cop/security/no_reflection_methods.rb
|
|
431
|
+
- rubocop/cop/security/no_ruby_llm_logger.rb
|
|
192
432
|
- single.yml
|
|
433
|
+
- swarm_cli.gemspec
|
|
434
|
+
- swarm_memory.gemspec
|
|
435
|
+
- swarm_sdk.gemspec
|
|
193
436
|
- team.yml
|
|
194
|
-
-
|
|
437
|
+
- team_full.yml
|
|
438
|
+
- team_sdk.yml
|
|
195
439
|
homepage: https://github.com/parruda/claude-swarm
|
|
196
440
|
licenses:
|
|
197
441
|
- MIT
|
|
198
442
|
metadata:
|
|
199
|
-
homepage_uri: https://github.com/parruda/claude-swarm
|
|
200
443
|
source_code_uri: https://github.com/parruda/claude-swarm
|
|
201
444
|
changelog_uri: https://github.com/parruda/claude-swarm/blob/main/CHANGELOG.md
|
|
202
445
|
rdoc_options: []
|
|
@@ -213,7 +456,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
213
456
|
- !ruby/object:Gem::Version
|
|
214
457
|
version: '0'
|
|
215
458
|
requirements: []
|
|
216
|
-
rubygems_version: 3.6.
|
|
459
|
+
rubygems_version: 3.6.2
|
|
217
460
|
specification_version: 4
|
|
218
461
|
summary: Orchestrate multiple Claude Code instances as a collaborative AI development
|
|
219
462
|
team
|
data/EXAMPLES.md
DELETED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
## Draft use case
|
|
2
|
-
|
|
3
|
-
Imagine you're working in the storefront-web repository. Page load times doubled yesterday. You're not sure why.
|
|
4
|
-
|
|
5
|
-
To investigate today you'd use a generalized Claude. It has access to dozens of MCP tools. Tools to read data from BigQuery. Tools to crawl repositories. Tools to checkout code it needs. Tools for GitHub interactions. Tools for Kafka. Tools for file operations.
|
|
6
|
-
|
|
7
|
-
You need to query BigQuery to pinpoint when the performance degraded. You also need to check recent gem upgrades. But Claude doesn't know which gem repositories to look at. You have to provide context about where to find gem source code. You have to guide it through vendor directories or gem installation paths.
|
|
8
|
-
|
|
9
|
-
Claude might be able to do this. But with dozens of MCP tools loaded and lots of context it can be overwhelmed and unfocused. It struggles to pick the right tools. It struggles to understand which repos to read. It struggles to keep context in mind while switching between data analysis and code exploration.
|
|
10
|
-
|
|
11
|
-
## Enter Claude-Swarm
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
Without Swarm: With Claude-Swarm:
|
|
15
|
-
|
|
16
|
-
┌──────────────────────────────┐ ┌─────────────────────────────────┐
|
|
17
|
-
│ You │ │ You │
|
|
18
|
-
└──────────────┬───────────────┘ └──────────────┬──────────────────┘
|
|
19
|
-
│ │
|
|
20
|
-
v v
|
|
21
|
-
┌──────────────────────────────┐ ┌─────────────────────────────────┐
|
|
22
|
-
│ Generalized Claude │ │ Coordinator │
|
|
23
|
-
│ │ │ │
|
|
24
|
-
│ [30+ MCP Tools] │ │ [Task delegation] │
|
|
25
|
-
│ • BigQuery tools │ └──────────────┬──────────────────┘
|
|
26
|
-
│ • File tools │ │
|
|
27
|
-
│ • Git tools │ ┌──────────────┼──────────────────┐
|
|
28
|
-
│ • GitHub tools │ │ │ │
|
|
29
|
-
│ • Kafka tools │ v v v
|
|
30
|
-
│ • ... │ ┌────────┐ ┌────────┐ ┌────────┐
|
|
31
|
-
│ │ │Data │ │Code │ │PR │
|
|
32
|
-
│ Overwhelmed & │ │Expert │ │Expert │ │Expert │
|
|
33
|
-
│ Context switching │ │[BQ] │ │[Files] │ │[GitHub]│
|
|
34
|
-
└──────────────────────────────┘ └────────┘ └────────┘ └────────┘
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Claude-swarm is one AI that can hire specialist AIs. Each specialist lives in one domain. You talk to the manager not the specialists. Manager coordinates and gives you answers.
|
|
38
|
-
|
|
39
|
-
It's NOT multiple AIs running at once. It's ONE AI with "summon expert" superpowers. Experts appear and answer questions. Then they disappear.
|
|
40
|
-
|
|
41
|
-
## Three Key Features
|
|
42
|
-
|
|
43
|
-
### Domain Isolation
|
|
44
|
-
- Data expert can pull BigQuery and performance metrics
|
|
45
|
-
- Code expert lives in gem source directory
|
|
46
|
-
- PR Expert only cares about writing a quality PR
|
|
47
|
-
- Each expert focused on their domain. Each expert with custom context and prompts.
|
|
48
|
-
|
|
49
|
-
### Selective Tool Access
|
|
50
|
-
- Data expert ONLY gets BigQuery and Kafka tools (prompt it with best practices and context for querying)
|
|
51
|
-
- Code expert ONLY gets file and git tools. It instantiates in a specific repo (Prompt it and provide it special context)
|
|
52
|
-
- PR expert ONLY gets PR/GH tools. Can prompt it with best practices for PR submissions/context
|
|
53
|
-
|
|
54
|
-
### Coordinated Intelligence
|
|
55
|
-
- You ask one question
|
|
56
|
-
- Get answers from multiple domains, each with specialized context and prompts
|
|
57
|
-
- "Why are pages loading slowly?"
|
|
58
|
-
- Data expert finds timing spike at 2pm yesterday
|
|
59
|
-
- Code expert finds the problem
|
|
60
|
-
- Code expert fixes the problem
|
|
61
|
-
- PR Expert creates the PR with your specifications
|
|
62
|
-
|
|
63
|
-
## Example Configuration
|
|
64
|
-
|
|
65
|
-
```yaml
|
|
66
|
-
version: 1
|
|
67
|
-
swarm:
|
|
68
|
-
name: "Performance Investigation"
|
|
69
|
-
main: coordinator
|
|
70
|
-
instances:
|
|
71
|
-
coordinator:
|
|
72
|
-
description: "Lead developer coordinating performance investigation"
|
|
73
|
-
directory: ~/storefront-web
|
|
74
|
-
connections: [data_expert, code_expert, pr_expert]
|
|
75
|
-
prompt: |
|
|
76
|
-
You are a senior lead developer coordinating a performance investigation team.
|
|
77
|
-
Your role is to delegate tasks to specialists and synthesize their findings.
|
|
78
|
-
|
|
79
|
-
When investigating performance issues:
|
|
80
|
-
1. Start with data_expert to identify when/where problems occurred
|
|
81
|
-
2. Use code_expert to analyze code changes and identify root causes
|
|
82
|
-
3. Use pr_expert to implement fixes via pull requests
|
|
83
|
-
|
|
84
|
-
Always provide clear, actionable summaries to the user.
|
|
85
|
-
|
|
86
|
-
data_expert:
|
|
87
|
-
description: "Analyzes performance metrics and data"
|
|
88
|
-
directory: ~/analysis
|
|
89
|
-
tools: [data_mcp_portal_find_tables, data_mcp_portal_query]
|
|
90
|
-
prompt: |
|
|
91
|
-
You are a data analyst specializing in web performance metrics.
|
|
92
|
-
You have access to BigQuery and performance monitoring data.
|
|
93
|
-
|
|
94
|
-
When analyzing performance issues:
|
|
95
|
-
- Always use partition filters (date-based) to limit query scope
|
|
96
|
-
- Look for correlations between timing spikes and deployments
|
|
97
|
-
- Focus on p95/p99 latencies, not just averages
|
|
98
|
-
- Identify affected user segments and geographic regions
|
|
99
|
-
|
|
100
|
-
Provide specific timestamps and quantified impact metrics.
|
|
101
|
-
|
|
102
|
-
code_expert:
|
|
103
|
-
description: "Analyzes code, dependencies, and implementations"
|
|
104
|
-
directory: ~/gems/http-client
|
|
105
|
-
tools: [read, grep, glob, git]
|
|
106
|
-
prompt: |
|
|
107
|
-
You are a senior Ruby developer specializing in performance optimization.
|
|
108
|
-
You work primarily with gems, dependencies, and low-level implementations.
|
|
109
|
-
|
|
110
|
-
When investigating performance issues:
|
|
111
|
-
- Check recent version changes in Gemfile.lock
|
|
112
|
-
- Look for connection pooling, caching, and resource management patterns
|
|
113
|
-
- Identify blocking I/O operations and inefficient algorithms
|
|
114
|
-
- Consider memory allocation and garbage collection impacts
|
|
115
|
-
|
|
116
|
-
Focus on actionable code-level fixes and configuration changes.
|
|
117
|
-
|
|
118
|
-
pr_expert:
|
|
119
|
-
description: "Creates high-quality pull requests"
|
|
120
|
-
directory: ~/storefront-web
|
|
121
|
-
tools: [read, write, gh_cli, git]
|
|
122
|
-
prompt: |
|
|
123
|
-
You are a senior developer focused on creating excellent pull requests.
|
|
124
|
-
|
|
125
|
-
For performance fixes:
|
|
126
|
-
- Write clear, specific titles: "Fix: Enable HTTP connection pooling for 40% latency reduction"
|
|
127
|
-
- Include before/after performance metrics in description
|
|
128
|
-
- Add links to supporting data analysis
|
|
129
|
-
- Include deployment considerations and rollback plans
|
|
130
|
-
- Add relevant reviewers based on affected systems
|
|
131
|
-
|
|
132
|
-
Always follow the team's PR template and coding standards.
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
## Investigation and Fix Flow
|
|
136
|
-
|
|
137
|
-
**You:** "Why are pages loading slowly?"
|
|
138
|
-
|
|
139
|
-
**Coordinator asks data_expert:** "When did latency spike and what's the impact?"
|
|
140
|
-
|
|
141
|
-
**Data expert:**
|
|
142
|
-
```sql
|
|
143
|
-
-- Query shows latency spike at 2:15 PM yesterday
|
|
144
|
-
-- P95 response time increased from 250ms to 890ms
|
|
145
|
-
-- Affecting 15% of traffic, primarily checkout flows
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
**Coordinator asks code_expert:** "What changed around 2:15 PM yesterday that could cause this?"
|
|
149
|
-
|
|
150
|
-
**Code expert:**
|
|
151
|
-
```ruby
|
|
152
|
-
# Gemfile.lock shows http-client gem updated from 3.1.9 to 3.2.0 at 2:14 PM
|
|
153
|
-
# Version 3.2.0 changelog: "Removed automatic connection pooling for thread safety"
|
|
154
|
-
# Now creates new HTTP connection per request instead of reusing connections
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
**Coordinator:** "The http-client gem update removed connection pooling, causing 3x latency increase during checkout."
|
|
158
|
-
|
|
159
|
-
**You:** "Fix this and create a PR"
|
|
160
|
-
|
|
161
|
-
**Code expert:** "Two options: downgrade to 3.1.9 or configure explicit pooling with `pool_size: 10` in initializer"
|
|
162
|
-
|
|
163
|
-
**PR expert:** "Created PR #1234: 'Fix: Enable HTTP connection pooling for 40% latency reduction' with performance benchmarks and rollback plan"
|
|
164
|
-
|