claude_swarm 0.1.14 → 0.1.16

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84e312dafa827cdd4e47476f06dde741574b6d3592a41f0f4461758e04c7a2ed
4
- data.tar.gz: dc2d25cbd5524074543902ce715dbd239a0701e450444f1012fc2c0fe96a37c9
3
+ metadata.gz: b71b3ce3aebae7de091dd130cda9fc4c474f538f444be15f1ee5b07501210db6
4
+ data.tar.gz: 846ac3f979b5912ccbc70f1810b760f625e75b1c7e905d5d1199b893d0bc3400
5
5
  SHA512:
6
- metadata.gz: 912831b498945b3aad80bfd8fac504e661150bce3f82aa0b69c0e74034f7d4b40faaf0f75bafabe44152fa030ec2ca85d0f7ed56e112a29c6b26f5927875c4c0
7
- data.tar.gz: 7cc1775698b209bfde6564324ca8fddd85a0a7bfcb869faea7d0f8572b8c2d2e64ff55f9b393d12a7d1beca96a0f615e304de0ab53da2d99f67ce6d72fa77b13
6
+ metadata.gz: 9f891010506baba80420357aad85a7fde6704c2ed99155e9cf32fd38cc35efd007ac19fe0e8a1df59b5f1df2d24980f7f0150551629667b42254d02bf77c4ddc
7
+ data.tar.gz: 29f913521f66298ee24dbdff1b8a043d3a00abe0723080b953cb3dbc127ac6e5ecb35a8b857f61af062db9d570f3c42a90e874dcb114b42f6bee163162f96a0a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,35 @@
1
+ ## [0.1.16]
2
+
3
+ ### Changed
4
+ - **Breaking change**: Removed custom permission MCP server in favor of Claude's native `mcp__MCP_NAME` pattern
5
+ - Connected instances are now automatically added to allowed tools as `mcp__<instance_name>`
6
+ - CLI parameter `--tools` renamed to `--allowed-tools` for consistency with YAML configuration
7
+ - MCP generator no longer creates permission MCP server configurations
8
+
9
+ ### Removed
10
+ - Removed `PermissionMcpServer` and `PermissionTool` classes
11
+ - Removed `tools-mcp` CLI command
12
+ - Removed regex tool pattern syntax - use Claude Code patterns instead
13
+ - Removed `--permission-prompt-tool` flag from orchestrator
14
+ - Removed permission logging to `permissions.log`
15
+
16
+ ### Migration Guide
17
+ - Replace custom tool patterns with Claude Code's native patterns in your YAML files:
18
+ - `"Bash(npm:*)"` → Use `Bash` and Claude Code's built-in command restrictions
19
+ - `"Edit(*.js)"` → Use `Edit` and Claude Code's built-in file restrictions
20
+ - For fine-grained tool control, use Claude Code's native patterns:
21
+ - `mcp__<server_name>__<tool_name>` for specific tools from an MCP server
22
+ - `mcp__<server_name>` to allow all tools from an MCP server
23
+ - Connected instances are automatically accessible via `mcp__<instance_name>` pattern
24
+ - See Claude Code's documentation for full details on supported tool patterns
25
+
26
+ ## [0.1.15]
27
+
28
+ ### Changed
29
+ - **Dependency update**: Switched from `fast-mcp` to `fast-mcp-annotations` for improved tool annotation support
30
+ - **Task tool annotations**: Added read-only, non-destructive, and closed-world hints to the task tool to allow parallel execution
31
+ - Change the task tool description to say there's no description parameter, so claude does not try to send it.
32
+
1
33
  ## [0.1.14]
2
34
 
3
35
  ### Changed
data/CLAUDE.md CHANGED
@@ -54,7 +54,7 @@ The gem is fully implemented with the following components:
54
54
 
55
55
  1. **YAML Configuration**: Define swarms with instances, connections, tools, and MCP servers
56
56
  2. **Inter-Instance Communication**: Instances connect via MCP using `claude mcp serve` with `-p` flag
57
- 3. **Tool Restrictions**: Support for pattern-based tool restrictions (e.g., `Bash(npm:*)`)
57
+ 3. **Tool Restrictions**: Support for tool restrictions using Claude's native pattern (connections are available as `mcp__instance_name`)
58
58
  4. **Multiple MCP Types**: Supports both stdio and SSE MCP server types
59
59
  5. **Automatic MCP Generation**: Creates `.claude-swarm/` directory with MCP configs
60
60
  6. **Custom System Prompts**: Each instance can have a custom prompt via `--append-system-prompt`
@@ -63,9 +63,10 @@ The gem is fully implemented with the following components:
63
63
 
64
64
  1. User creates a `claude-swarm.yml` file defining the swarm topology
65
65
  2. Running `claude-swarm` parses the configuration and validates it
66
- 3. MCP configuration files are generated for each instance in `.claude-swarm/`
66
+ 3. MCP configuration files are generated for each instance in a session directory
67
67
  4. The main instance is launched with `exec`, replacing the current process
68
68
  5. Connected instances are available as MCP servers to the main instance
69
+ 6. When an instance has connections, those connections are automatically added to its allowed tools as `mcp__<connection_name>`
69
70
 
70
71
  ### Configuration Example
71
72
 
@@ -85,15 +86,18 @@ swarm:
85
86
  directory: ./frontend
86
87
  model: sonnet
87
88
  prompt: "You specialize in frontend development with React"
88
- tools: [Edit, Write, "Bash(npm:*)"]
89
+ tools: [Edit, Write, Bash]
89
90
  ```
90
91
 
91
92
  ## Testing
92
93
 
93
- The gem includes basic tests for version number and CLI existence. Additional tests should be added for:
94
+ The gem includes comprehensive tests covering:
94
95
  - Configuration parsing and validation
95
- - MCP generation logic
96
+ - MCP generation logic with connections
96
97
  - Error handling scenarios
98
+ - CLI command functionality
99
+ - Session restoration
100
+ - Vibe mode behavior
97
101
 
98
102
  ## Dependencies
99
103
 
data/EXAMPLES.md ADDED
@@ -0,0 +1,164 @@
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
+
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Claude Swarm
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/claude_swarm.svg?cache_bust=0.1.13)](https://badge.fury.io/rb/claude_swarm)
3
+ [![Gem Version](https://badge.fury.io/rb/claude_swarm.svg?cache_bust=0.1.15)](https://badge.fury.io/rb/claude_swarm)
4
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
5
 
6
6
  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.
@@ -113,7 +113,7 @@ swarm:
113
113
  directory: ./web-frontend/src
114
114
  model: opus
115
115
  prompt: "You specialize in React components and state management"
116
- allowed_tools: [Edit, Write, "Bash(npm:*)"]
116
+ allowed_tools: [Edit, Write, Bash]
117
117
 
118
118
  css_expert:
119
119
  description: "CSS specialist handling styling and responsive design"
@@ -142,7 +142,7 @@ swarm:
142
142
  directory: ./api-server/db
143
143
  model: opus
144
144
  prompt: "You handle database schema and migrations"
145
- allowed_tools: [Edit, Write, "Bash(psql:*, migrate:*)"]
145
+ allowed_tools: [Edit, Write, Bash]
146
146
 
147
147
  mobile_lead:
148
148
  description: "Mobile team lead coordinating cross-platform development"
@@ -157,21 +157,21 @@ swarm:
157
157
  directory: ./mobile-app/ios
158
158
  model: opus
159
159
  prompt: "You develop the iOS application"
160
- allowed_tools: [Edit, Write, "Bash(xcodebuild:*, pod:*)"]
160
+ allowed_tools: [Edit, Write, Bash]
161
161
 
162
162
  android_dev:
163
163
  description: "Android developer creating native Android apps"
164
164
  directory: ./mobile-app/android
165
165
  model: opus
166
166
  prompt: "You develop the Android application"
167
- allowed_tools: [Edit, Write, "Bash(gradle:*, adb:*)"]
167
+ allowed_tools: [Edit, Write, Bash]
168
168
 
169
169
  devops:
170
170
  description: "DevOps engineer managing CI/CD and infrastructure"
171
171
  directory: ./infrastructure
172
172
  model: opus
173
173
  prompt: "You handle CI/CD and infrastructure"
174
- allowed_tools: [Read, Edit, "Bash(docker:*, kubectl:*)"]
174
+ allowed_tools: [Read, Edit, Bash]
175
175
  ```
176
176
 
177
177
  In this setup:
@@ -179,6 +179,7 @@ In this setup:
179
179
  - Each team lead can work with their specialized developers
180
180
  - Each instance is independent - connections create separate MCP server instances
181
181
  - Teams work in isolated directories with role-appropriate tools
182
+ - Connected instances are accessible via MCP tools like `mcp__frontend_lead__task`, `mcp__backend_lead__task`, etc.
182
183
 
183
184
 
184
185
  ### Configuration Format
@@ -272,23 +273,22 @@ allowed_tools:
272
273
  - WebFetch # Fetch web content
273
274
  - WebSearch # Search the web
274
275
 
275
- disallowed_tools: # Optional: explicitly deny specific tools
276
- - "Write(*.md)" # Don't allow writing markdown files
277
- - "Bash(rm:*)" # Don't allow rm commands
276
+ # Note: Pattern-based tool restrictions have been deprecated.
277
+ # Use allowed_tools and disallowed_tools with tool names only.
278
278
  ```
279
279
 
280
280
  Tools are passed to Claude using the `--allowedTools` and `--disallowedTools` flags with comma-separated values. Disallowed tools take precedence over allowed tools.
281
281
 
282
- #### Tool Restrictions
283
-
284
- You can restrict tools with pattern-based filters:
282
+ #### Available Tools
285
283
 
286
284
  ```yaml
287
285
  allowed_tools:
288
- - Read # Unrestricted read access
289
- - Edit # Unrestricted edit access
290
- - "Bash(npm:*)" # Only allow npm commands
291
- - "Bash(git:*, make:*)" # Only allow git and make commands
286
+ - Read # File reading
287
+ - Edit # File editing
288
+ - Write # File creation
289
+ - Bash # Command execution
290
+ - WebFetch # Fetch web content
291
+ - WebSearch # Search the web
292
292
  ```
293
293
 
294
294
  ### Examples
@@ -419,7 +419,7 @@ swarm:
419
419
  description: "Worker with restricted permissions"
420
420
  directory: ./sensitive
421
421
  model: sonnet
422
- allowed_tools: [Read, "Bash(ls:*)"] # Only allow read and ls commands
422
+ allowed_tools: [Read, Bash] # Allow read and bash commands
423
423
 
424
424
  trusted_worker:
425
425
  description: "Trusted worker with more permissions"
@@ -457,9 +457,8 @@ claude-swarm list-sessions --limit 20
457
457
  # Show version
458
458
  claude-swarm version
459
459
 
460
- # Start permission MCP server (for testing/debugging)
461
- claude-swarm tools-mcp --allowed-tools 'mcp__frontend__*,mcp__backend__*'
462
- claude-swarm tools-mcp --allowed-tools 'Read,Edit' --disallowed-tools 'Edit(*.log)'
460
+ # Note: The permission MCP server has been deprecated.
461
+ # Tool permissions are now handled through allowed_tools and disallowed_tools in your configuration.
463
462
 
464
463
  # Internal command for MCP server (used by connected instances)
465
464
  claude-swarm mcp-serve INSTANCE_NAME --config CONFIG_FILE --session-timestamp TIMESTAMP
@@ -477,7 +476,7 @@ All session files are organized in `~/.claude-swarm/sessions/{project}/{timestam
477
476
  - `{instance_name}.mcp.json`: MCP configuration files
478
477
  - `session.log`: Human-readable request/response tracking
479
478
  - `session.log.json`: All events in JSONL format (one JSON per line)
480
- - `permissions.log`: Permission checks and decisions
479
+ # Note: permissions.log is no longer generated as the permission MCP server has been deprecated
481
480
 
482
481
  #### Listing Sessions
483
482
  View your previous Claude Swarm sessions:
@@ -535,15 +534,11 @@ This will:
535
534
  2. **MCP Generation**: For each instance, it generates an MCP configuration file that includes:
536
535
  - Any explicitly defined MCP servers
537
536
  - MCP servers for each connected instance (using `claude-swarm mcp-serve`)
538
- - A permission MCP server (unless using `--vibe` mode)
539
- 3. **Tool Permissions**: Claude Swarm automatically manages tool permissions:
540
- - Each instance's configured tools are allowed via the permission MCP
541
- - Supports wildcard patterns (e.g., `mcp__frontend__*` allows all frontend MCP tools)
537
+ 3. **Tool Permissions**: Claude Swarm manages tool permissions through configuration:
538
+ - Each instance's `allowed_tools` specifies which tools it can use
539
+ - Connected instances are accessible via `mcp__<instance_name>__*` pattern
542
540
  - Disallowed tools take precedence over allowed tools for fine-grained control
543
- - Eliminates the need to manually accept each tool or use global `--vibe` mode
544
541
  - Per-instance `vibe: true` skips all permission checks for that specific instance
545
- - The permission MCP uses `--permission-prompt-tool` to check tool access
546
- - Permission decisions are logged to `~/.claude-swarm/sessions/{project}/{timestamp}/permissions.log`
547
542
  4. **Session Persistence**: Claude Swarm automatically tracks session state:
548
543
  - Generates a shared session path for all instances
549
544
  - Each instance's Claude session ID is captured and saved
data/claude-swarm.yml CHANGED
@@ -18,7 +18,7 @@ swarm:
18
18
  directory: .
19
19
  model: sonnet
20
20
  prompt: "You specialize in frontend development with React, TypeScript, and modern web technologies"
21
- allowed_tools: [Read, Edit, Write, "Bash(npm:*)", "Bash(yarn:*)", "Bash(pnpm:*)"]
21
+ allowed_tools: [Read, Edit, Write, Bash]
22
22
 
23
23
  backend_dev:
24
24
  description: "Backend developer focusing on APIs, databases, and server architecture"
@@ -32,7 +32,7 @@ swarm:
32
32
  # directory: .
33
33
  # model: sonnet
34
34
  # prompt: "You specialize in infrastructure, CI/CD, containerization, and deployment"
35
- # allowed_tools: [Read, Edit, Write, "Bash(docker:*)", "Bash(kubectl:*)", "Bash(terraform:*)"]
35
+ # allowed_tools: [Read, Edit, Write, Bash]
36
36
 
37
37
  # qa_engineer:
38
38
  # description: "QA engineer ensuring quality through comprehensive testing"
@@ -58,7 +58,7 @@ swarm:
58
58
  allowed_tools:
59
59
  - Edit
60
60
  - Write
61
- - "Bash(npm:*, yarn:*, jest:*)"
61
+ - Bash
62
62
 
63
63
  ui_designer:
64
64
  description: "UI/UX specialist creating responsive designs and managing design system"
@@ -91,7 +91,7 @@ swarm:
91
91
  allowed_tools:
92
92
  - Edit
93
93
  - Write
94
- - "Bash(go:*, docker:*, make:*)"
94
+ - Bash
95
95
 
96
96
  api_gateway_dev:
97
97
  description: "API gateway developer managing request routing and rate limiting"
@@ -101,7 +101,7 @@ swarm:
101
101
  allowed_tools:
102
102
  - Edit
103
103
  - Write
104
- - "Bash(go:*, docker:*, kong:*)"
104
+ - Bash
105
105
 
106
106
  core_service_dev:
107
107
  description: "Core business logic service developer"
@@ -111,7 +111,7 @@ swarm:
111
111
  allowed_tools:
112
112
  - Edit
113
113
  - Write
114
- - "Bash(python:*, pip:*, pytest:*, docker:*)"
114
+ - Bash
115
115
 
116
116
  shared_lib_dev:
117
117
  description: "Shared libraries developer maintaining common code across services"
@@ -122,7 +122,7 @@ swarm:
122
122
  allowed_tools:
123
123
  - Edit
124
124
  - Write
125
- - "Bash(npm:*, go:*, python:*)"
125
+ - Bash
126
126
 
127
127
  # Mobile Team
128
128
  mobile_lead:
@@ -143,7 +143,7 @@ swarm:
143
143
  allowed_tools:
144
144
  - Edit
145
145
  - Write
146
- - "Bash(swift:*, xcodebuild:*, pod:*, fastlane:*)"
146
+ - Bash
147
147
 
148
148
  android_senior:
149
149
  description: "Senior Android developer creating Kotlin applications"
@@ -153,7 +153,7 @@ swarm:
153
153
  allowed_tools:
154
154
  - Edit
155
155
  - Write
156
- - "Bash(gradle:*, adb:*, fastlane:*)"
156
+ - Bash
157
157
 
158
158
  # Data Team
159
159
  data_lead:
@@ -175,7 +175,7 @@ swarm:
175
175
  allowed_tools:
176
176
  - Edit
177
177
  - Write
178
- - "Bash(python:*, airflow:*, spark:*, dbt:*)"
178
+ - Bash
179
179
 
180
180
  ml_engineer:
181
181
  description: "ML engineer developing and deploying machine learning models"
@@ -185,7 +185,7 @@ swarm:
185
185
  allowed_tools:
186
186
  - Edit
187
187
  - Write
188
- - "Bash(python:*, jupyter:*, mlflow:*, docker:*)"
188
+ - Bash
189
189
 
190
190
  analytics_dev:
191
191
  description: "Analytics developer creating dashboards and reports"
@@ -195,7 +195,7 @@ swarm:
195
195
  allowed_tools:
196
196
  - Edit
197
197
  - Write
198
- - "Bash(python:*, sql:*)"
198
+ - Bash
199
199
 
200
200
  # DevOps & Infrastructure
201
201
  devops_lead:
@@ -217,7 +217,7 @@ swarm:
217
217
  allowed_tools:
218
218
  - Edit
219
219
  - Write
220
- - "Bash(kubectl:*, helm:*, prometheus:*, grafana:*)"
220
+ - Bash
221
221
 
222
222
  platform_engineer:
223
223
  description: "Platform engineer managing Kubernetes and container infrastructure"
@@ -227,7 +227,7 @@ swarm:
227
227
  allowed_tools:
228
228
  - Edit
229
229
  - Write
230
- - "Bash(kubectl:*, helm:*, docker:*, istioctl:*)"
230
+ - Bash
231
231
 
232
232
  cloud_architect:
233
233
  description: "Cloud architect managing AWS/GCP infrastructure and costs"
@@ -237,7 +237,7 @@ swarm:
237
237
  allowed_tools:
238
238
  - Edit
239
239
  - Write
240
- - "Bash(terraform:*, aws:*, gcloud:*)"
240
+ - Bash
241
241
 
242
242
  # Quality & Security
243
243
  qa_lead:
@@ -259,7 +259,7 @@ swarm:
259
259
  allowed_tools:
260
260
  - Edit
261
261
  - Write
262
- - "Bash(npm:*, cypress:*, playwright:*)"
262
+ - Bash
263
263
 
264
264
  backend_qa:
265
265
  description: "Backend QA engineer creating API tests and integration tests"
@@ -269,7 +269,7 @@ swarm:
269
269
  allowed_tools:
270
270
  - Edit
271
271
  - Write
272
- - "Bash(python:*, pytest:*, postman:*, k6:*)"
272
+ - Bash
273
273
 
274
274
  mobile_qa:
275
275
  description: "Mobile QA engineer testing iOS and Android applications"
@@ -279,7 +279,7 @@ swarm:
279
279
  allowed_tools:
280
280
  - Edit
281
281
  - Write
282
- - "Bash(appium:*, xctest:*, espresso:*)"
282
+ - Bash
283
283
 
284
284
  security_lead:
285
285
  description: "Security lead ensuring application and infrastructure security"
@@ -290,4 +290,4 @@ swarm:
290
290
  allowed_tools:
291
291
  - Read
292
292
  - Edit
293
- - "Bash(trivy:*, snyk:*, owasp:*)"
293
+ - Bash
@@ -36,7 +36,7 @@ swarm:
36
36
  description: "Unit test specialist focusing on models, services, and isolated business logic with Minitest"
37
37
  directory: ./spec
38
38
  model: opus
39
- connections: [test_architect, factory_specialist]
39
+ connections: [factory_specialist]
40
40
  prompt: |
41
41
  You are a Rails unit testing expert specializing in Minitest. Your focus areas:
42
42
 
@@ -70,13 +70,13 @@ swarm:
70
70
  - Read
71
71
  - Edit
72
72
  - Write
73
- - "Bash(bundle:*)"
73
+ - Bash
74
74
 
75
75
  integration_test_expert:
76
76
  description: "Integration test specialist for controllers, API endpoints, and request specs"
77
77
  directory: ./spec
78
78
  model: opus
79
- connections: [test_architect, factory_specialist]
79
+ connections: [factory_specialist]
80
80
  prompt: |
81
81
  You are a Rails integration testing expert focusing on request specs and controller tests. Your expertise:
82
82
 
@@ -111,13 +111,12 @@ swarm:
111
111
  - Read
112
112
  - Edit
113
113
  - Write
114
- - "Bash(bundle:*, rails:*)"
114
+ - Bash
115
115
 
116
116
  system_test_expert:
117
117
  description: "System test specialist for end-to-end user flows and JavaScript interactions"
118
118
  directory: ./spec/system
119
119
  model: opus
120
- connections: [test_architect]
121
120
  prompt: |
122
121
  You are a Rails system testing expert using Capybara and Selenium. Your specialization:
123
122
 
@@ -155,13 +154,12 @@ swarm:
155
154
  - Read
156
155
  - Edit
157
156
  - Write
158
- - "Bash(bundle:*)"
157
+ - Bash
159
158
 
160
159
  factory_specialist:
161
160
  description: "Test data specialist managing factories, traits, and test data generation"
162
161
  directory: ./spec/factories
163
162
  model: opus
164
- connections: [test_architect, unit_test_expert, integration_test_expert]
165
163
  prompt: |
166
164
  You are a Rails test data expert specializing in FactoryBot. Your responsibilities:
167
165
 
@@ -200,13 +198,12 @@ swarm:
200
198
  - Read
201
199
  - Edit
202
200
  - Write
203
- - "Bash(bundle:*)"
201
+ - Bash
204
202
 
205
203
  test_quality_reviewer:
206
204
  description: "Test quality assurance specialist ensuring best practices, coverage, and maintainability"
207
205
  directory: .
208
206
  model: opus
209
- connections: [test_architect]
210
207
  prompt: |
211
208
  You are a Rails test quality reviewer ensuring all tests meet the highest standards. Your review criteria:
212
209
 
@@ -246,4 +243,4 @@ swarm:
246
243
  Provide actionable feedback to improve test quality and coverage.
247
244
  allowed_tools:
248
245
  - Read
249
- - "Bash(bundle:*, rubocop:*)"
246
+ - Bash
@@ -278,10 +278,18 @@ module ClaudeSwarm
278
278
  if @vibe
279
279
  cmd_array << "--dangerously-skip-permissions"
280
280
  else
281
+ # Build allowed tools list including MCP connections
282
+ allowed_tools = options[:allowed_tools] ? Array(options[:allowed_tools]).dup : []
283
+
284
+ # Add mcp__instance_name for each connection if we have instance info
285
+ options[:connections]&.each do |connection_name|
286
+ allowed_tools << "mcp__#{connection_name}"
287
+ end
288
+
281
289
  # Add allowed tools if any
282
- if options[:allowed_tools]
283
- tools = Array(options[:allowed_tools]).join(",")
284
- cmd_array += ["--allowedTools", tools]
290
+ if allowed_tools.any?
291
+ tools_str = allowed_tools.join(",")
292
+ cmd_array += ["--allowedTools", tools_str]
285
293
  end
286
294
 
287
295
  # Add disallowed tools if any
@@ -289,9 +297,6 @@ module ClaudeSwarm
289
297
  disallowed_tools = Array(options[:disallowed_tools]).join(",")
290
298
  cmd_array += ["--disallowedTools", disallowed_tools]
291
299
  end
292
-
293
- # Add permission prompt tool if not in vibe mode
294
- cmd_array += ["--permission-prompt-tool", "mcp__permissions__check_permission"]
295
300
  end
296
301
 
297
302
  cmd_array