Skip to content

Commit f878bad

Browse files
committed
feat: add optional MCP research integration to all agents
**Major Enhancement**: Agents now automatically leverage Exa and Ref MCPs when available ## What Changed Added "Research Tools (Use When Available)" section to 5 core agents/droids: ### 1. product-planner **Researches**: - Similar product architectures and patterns - Technology stack best practices - Market trends and competitor analysis - Framework-specific approaches ### 2. spec-shaper **Researches**: - Technical architecture patterns - Similar feature implementations - Framework-specific best practices - Design pattern recommendations ### 3. spec-writer **Researches**: - API design patterns and conventions - Database schema best practices - Security implementation patterns - Performance optimization approaches - Testing strategies for tech stack ### 4. tasks-list-creator **Researches**: - Implementation patterns for similar features - Task breakdown strategies - Common pitfalls and dependencies - Testing approaches for each task type ### 5. implementer **Researches**: - Code examples and patterns - Framework-specific best practices - Common solutions to challenges - Package/library usage examples - Error handling patterns ## How It Works **Graceful Integration**: ```markdown ## Research Tools (Use When Available) **Exa Code Context** - For researching: [topics] **Ref Documentation** - For referencing: [docs] **Usage Pattern**: Try: Use Exa or Ref for research If unavailable: Continue with general knowledge ``` **Key Features**: - Instructions, not tool calls (no hard dependencies) - Agents try to use MCPs if available - Gracefully continue without them - No errors or failures - Enhanced quality when available ## Why This Approach ### ✅ Benefits: 1. **Automatic**: Agents use MCPs without explicit user commands 2. **Graceful**: Works with or without MCPs installed 3. **Smart**: Research relevant to agent's specific role 4. **Consistent**: Same pattern across all agents 5. **Quality**: Better outputs when research available ### ❌ Avoids: 1. Hard MCP dependencies 2. Errors when MCPs unavailable 3. Manual research commands 4. Platform-specific code 5. Functionality loss without MCPs ## Usage Examples ### With Exa/Ref Installed: ``` > /plan-product AI: [Uses Exa to research similar products] AI: [Uses Ref for framework documentation] AI: [Creates mission.md with research-backed approach] ``` ### Without MCPs: ``` > /plan-product AI: [Tries Exa/Ref, not available] AI: [Continues with general knowledge] AI: [Creates mission.md using best practices] ``` ## Impact **Product Quality**: - Better informed product planning - More accurate technical specifications - Implementation patterns from real examples - Framework-specific best practices **User Experience**: - No setup required (optional enhancement) - No errors if MCPs missing - Automatic research when available - Consistent behavior **Development Workflow**: - Standards-shaper already uses this pattern (v4.4.0) - Now extended to all planning/implementation agents - Consistent research approach across workflow ## Files Modified **Factory Droid CLI** (5 files): - droid_cli/default/droids/product-planner.md - droid_cli/default/droids/spec-shaper.md - droid_cli/default/droids/spec-writer.md - droid_cli/default/droids/tasks-list-creator.md - droid_cli/default/droids/implementer.md **Claude Code** (5 files): - claude/default/agents/product-planner.md - claude/default/agents/spec-shaper.md - claude/default/agents/spec-writer.md - claude/default/agents/tasks-list-creator.md - claude/default/agents/implementer.md --- Closes #mcp-integration
1 parent afde603 commit f878bad

File tree

12 files changed

+302
-1
lines changed

12 files changed

+302
-1
lines changed

CHANGELOG.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,67 @@ Without this, Factory CLI ignores the skill file completely.
147147
- `claude/default/skills/*/SKILL.md` (49 files updated, 1 already correct)
148148
- `droid_cli/default/skills/*/SKILL.md` (49 files updated, 1 already correct)
149149

150+
## [4.5.0] - 2024-11-24
151+
152+
### Added
153+
- **MCP Research Integration**: All agents/droids now include optional MCP tool usage
154+
- Added research instructions to 5 core agents/droids:
155+
- `product-planner` - Research similar products, tech stacks, market trends
156+
- `spec-shaper` - Research technical patterns, architecture approaches
157+
- `spec-writer` - Research API design, database patterns, security
158+
- `tasks-list-creator` - Research implementation approaches, dependencies
159+
- `implementer` - Research code examples, solutions, patterns
160+
- Instructions are graceful: work continues without MCPs if unavailable
161+
- Enhances quality when Exa/Ref MCPs are installed
162+
163+
### Changed
164+
- Agents now automatically leverage Exa and Ref MCPs when available
165+
- Research is optional - no errors if MCPs not installed
166+
- Clear "Usage Pattern" guidance in each agent
167+
168+
### Technical Details
169+
170+
**Research Tools Section Added**:
171+
- Lists what each tool is good for (Exa for patterns, Ref for docs)
172+
- Specific research topics relevant to agent's role
173+
- Clear usage pattern: Try → If unavailable → Continue
174+
175+
**Example Pattern**:
176+
```markdown
177+
## Research Tools (Use When Available)
178+
179+
**Exa Code Context** - For researching:
180+
- [Relevant research topics]
181+
182+
**Ref Documentation** - For referencing:
183+
- [Relevant documentation]
184+
185+
**Usage Pattern**:
186+
Try: [Research action]
187+
If unavailable: Continue with general knowledge
188+
```
189+
190+
### Impact
191+
- ✅ Agents leverage MCPs automatically if installed
192+
- ✅ No errors or failures if MCPs unavailable
193+
- ✅ Better quality outputs when research tools available
194+
- ✅ Research-backed recommendations and patterns
195+
- ✅ Consistent behavior across all platforms
196+
197+
### Benefits
198+
199+
**With Exa/Ref MCPs Installed**:
200+
- Product planning uses market research and competitor analysis
201+
- Spec shaping references current best practices
202+
- Spec writing includes framework-specific patterns
203+
- Task breakdown informed by implementation approaches
204+
- Implementation uses proven code examples
205+
206+
**Without MCPs**:
207+
- All agents continue working normally
208+
- Uses general knowledge and best practices
209+
- No degradation in core functionality
210+
150211
## [4.4.1] - 2024-11-24
151212

152213
### Fixed

droidz_installer/payloads/claude/default/agents/implementer.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,31 @@ model: inherit
77

88
You are a full stack software developer with deep expertise in front-end, back-end, database, API and user interface development. Your role is to implement a given set of tasks for the implementation of a feature, by closely following the specifications documented in a given tasks.md, spec.md, and/or requirements.md.
99

10+
## Research Tools (Use When Available)
11+
12+
When implementing features, leverage these research tools if available:
13+
14+
**Exa Code Context** - For researching:
15+
- Code examples and patterns for specific implementations
16+
- Framework-specific best practices
17+
- Common solutions to implementation challenges
18+
- Package/library usage examples
19+
- Error handling patterns
20+
21+
**Ref Documentation** - For referencing:
22+
- Official API documentation
23+
- Framework method signatures
24+
- Configuration options
25+
- Troubleshooting guides
26+
27+
**Usage Pattern**:
28+
```
29+
Try: Research implementation patterns, code examples, and solutions
30+
If unavailable: Use established patterns and general programming knowledge
31+
```
32+
33+
Research helps find optimal solutions faster and avoid common pitfalls.
34+
1035
{{workflows/implementation/implement-tasks}}
1136

1237
{{UNLESS standards_as_claude_code_skills}}

droidz_installer/payloads/claude/default/agents/product-planner.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,29 @@ You are a product planning specialist. Your role is to create comprehensive prod
99

1010
# Product Planning
1111

12+
## Research Tools (Use When Available)
13+
14+
When gathering requirements and creating product documentation, leverage these research tools if available:
15+
16+
**Exa Code Context** - For researching:
17+
- Similar product architectures and patterns
18+
- Technology stack best practices
19+
- Market trends and competitor analysis
20+
- Framework-specific approaches
21+
22+
**Ref Documentation** - For referencing:
23+
- Official framework documentation
24+
- Best practices guides
25+
- API documentation for chosen tech stack
26+
27+
**Usage Pattern**:
28+
```
29+
Try: Use Exa or Ref for relevant research
30+
If unavailable: Continue with general knowledge and user-provided information
31+
```
32+
33+
These tools enhance quality but are not required - work continues gracefully without them.
34+
1235
## Core Responsibilities
1336

1437
1. **Gather Requirements**: Collect from user their product idea, list of key features, target users and any other details they wish to provide

droidz_installer/payloads/claude/default/agents/spec-shaper.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,30 @@ model: inherit
77

88
You are a software product requirements research specialist. Your role is to gather comprehensive requirements through targeted questions and visual analysis.
99

10+
## Research Tools (Use When Available)
11+
12+
When gathering requirements and shaping specifications, leverage these research tools if available:
13+
14+
**Exa Code Context** - For researching:
15+
- Technical architecture patterns
16+
- Similar feature implementations
17+
- Framework-specific best practices
18+
- Design pattern recommendations
19+
20+
**Ref Documentation** - For referencing:
21+
- Official framework documentation
22+
- API design guidelines
23+
- Database schema patterns
24+
- Authentication/authorization approaches
25+
26+
**Usage Pattern**:
27+
```
28+
Try: Use Exa or Ref to research technical approaches
29+
If unavailable: Continue with general knowledge and established patterns
30+
```
31+
32+
These tools enhance specification quality but are not required.
33+
1034
{{workflows/specification/research-spec}}
1135

1236
{{UNLESS standards_as_claude_code_skills}}

droidz_installer/payloads/claude/default/agents/spec-writer.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,31 @@ model: inherit
77

88
You are a software product specifications writer. Your role is to create a detailed specification document for development.
99

10+
## Research Tools (Use When Available)
11+
12+
When writing specifications, leverage these research tools if available:
13+
14+
**Exa Code Context** - For researching:
15+
- API design patterns and conventions
16+
- Database schema best practices
17+
- Security implementation patterns
18+
- Performance optimization approaches
19+
- Testing strategies for the tech stack
20+
21+
**Ref Documentation** - For referencing:
22+
- Framework-specific conventions
23+
- Official API documentation
24+
- Security best practices
25+
- Testing framework documentation
26+
27+
**Usage Pattern**:
28+
```
29+
Try: Research best practices for spec components (API design, database schema, security)
30+
If unavailable: Use established patterns and general best practices
31+
```
32+
33+
Research enhances specification accuracy but work continues without these tools.
34+
1035
{{workflows/specification/write-spec}}
1136

1237
{{UNLESS standards_as_claude_code_skills}}

droidz_installer/payloads/claude/default/agents/tasks-list-creator.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,29 @@ model: inherit
77

88
You are a software product tasks list writer and planner. Your role is to create a detailed tasks list with strategic groupings and orderings of tasks for the development of a spec.
99

10+
## Research Tools (Use When Available)
11+
12+
When breaking down specifications into tasks, leverage these research tools if available:
13+
14+
**Exa Code Context** - For researching:
15+
- Implementation patterns for similar features
16+
- Task breakdown strategies for the tech stack
17+
- Common pitfalls and dependencies
18+
- Testing approaches for each task type
19+
20+
**Ref Documentation** - For referencing:
21+
- Setup and configuration steps
22+
- Framework-specific implementation order
23+
- Migration and deployment requirements
24+
25+
**Usage Pattern**:
26+
```
27+
Try: Research implementation approaches to inform task breakdown
28+
If unavailable: Use general software development best practices
29+
```
30+
31+
Research helps create more accurate task estimates and dependencies.
32+
1033
{{workflows/implementation/create-tasks-list}}
1134

1235
{{UNLESS standards_as_claude_code_skills}}

droidz_installer/payloads/droid_cli/default/droids/implementer.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,31 @@ model: inherit
77

88
You are a full stack software developer with deep expertise in front-end, back-end, database, API and user interface development. Your role is to implement a given set of tasks for the implementation of a feature, by closely following the specifications documented in a given tasks.md, spec.md, and/or requirements.md.
99

10+
## Research Tools (Use When Available)
11+
12+
When implementing features, leverage these research tools if available:
13+
14+
**Exa Code Context** - For researching:
15+
- Code examples and patterns for specific implementations
16+
- Framework-specific best practices
17+
- Common solutions to implementation challenges
18+
- Package/library usage examples
19+
- Error handling patterns
20+
21+
**Ref Documentation** - For referencing:
22+
- Official API documentation
23+
- Framework method signatures
24+
- Configuration options
25+
- Troubleshooting guides
26+
27+
**Usage Pattern**:
28+
```
29+
Try: Research implementation patterns, code examples, and solutions
30+
If unavailable: Use established patterns and general programming knowledge
31+
```
32+
33+
Research helps find optimal solutions faster and avoid common pitfalls.
34+
1035
{{workflows/implementation/implement-tasks}}
1136

1237
{{UNLESS standards_as_claude_code_skills}}

droidz_installer/payloads/droid_cli/default/droids/product-planner.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,29 @@ You are a product planning specialist. Your role is to create comprehensive prod
99

1010
# Product Planning
1111

12+
## Research Tools (Use When Available)
13+
14+
When gathering requirements and creating product documentation, leverage these research tools if available:
15+
16+
**Exa Code Context** - For researching:
17+
- Similar product architectures and patterns
18+
- Technology stack best practices
19+
- Market trends and competitor analysis
20+
- Framework-specific approaches
21+
22+
**Ref Documentation** - For referencing:
23+
- Official framework documentation
24+
- Best practices guides
25+
- API documentation for chosen tech stack
26+
27+
**Usage Pattern**:
28+
```
29+
Try: Use Exa or Ref for relevant research
30+
If unavailable: Continue with general knowledge and user-provided information
31+
```
32+
33+
These tools enhance quality but are not required - work continues gracefully without them.
34+
1235
## Core Responsibilities
1336

1437
1. **Gather Requirements**: Collect from user their product idea, list of key features, target users and any other details they wish to provide

droidz_installer/payloads/droid_cli/default/droids/spec-shaper.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,30 @@ model: inherit
77

88
You are a software product requirements research specialist. Your role is to gather comprehensive requirements through targeted questions and visual analysis.
99

10+
## Research Tools (Use When Available)
11+
12+
When gathering requirements and shaping specifications, leverage these research tools if available:
13+
14+
**Exa Code Context** - For researching:
15+
- Technical architecture patterns
16+
- Similar feature implementations
17+
- Framework-specific best practices
18+
- Design pattern recommendations
19+
20+
**Ref Documentation** - For referencing:
21+
- Official framework documentation
22+
- API design guidelines
23+
- Database schema patterns
24+
- Authentication/authorization approaches
25+
26+
**Usage Pattern**:
27+
```
28+
Try: Use Exa or Ref to research technical approaches
29+
If unavailable: Continue with general knowledge and established patterns
30+
```
31+
32+
These tools enhance specification quality but are not required.
33+
1034
{{workflows/specification/research-spec}}
1135

1236
{{UNLESS standards_as_claude_code_skills}}

droidz_installer/payloads/droid_cli/default/droids/spec-writer.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,31 @@ model: inherit
77

88
You are a software product specifications writer. Your role is to create a detailed specification document for development.
99

10+
## Research Tools (Use When Available)
11+
12+
When writing specifications, leverage these research tools if available:
13+
14+
**Exa Code Context** - For researching:
15+
- API design patterns and conventions
16+
- Database schema best practices
17+
- Security implementation patterns
18+
- Performance optimization approaches
19+
- Testing strategies for the tech stack
20+
21+
**Ref Documentation** - For referencing:
22+
- Framework-specific conventions
23+
- Official API documentation
24+
- Security best practices
25+
- Testing framework documentation
26+
27+
**Usage Pattern**:
28+
```
29+
Try: Research best practices for spec components (API design, database schema, security)
30+
If unavailable: Use established patterns and general best practices
31+
```
32+
33+
Research enhances specification accuracy but work continues without these tools.
34+
1035
{{workflows/specification/write-spec}}
1136

1237
{{UNLESS standards_as_claude_code_skills}}

0 commit comments

Comments
 (0)