Coverage for mcp_bridge/tools/templates.py: 0%

1"""

2 Templates for stravinsky repository initialization.

3"""

4

5 CLAUDE_MD_TEMPLATE = """## stravinsky MCP (Multi-Model Orchestration)

6

7 Stravinsky provides multi-model AI orchestration with parallel agent execution.

8

9### Architecture

10- **Native Subagent**: Stravinsky orchestrator (.claude/agents/stravinsky.md) auto-delegates complex tasks

11- **MCP Tools**: agent_spawn, invoke_gemini, invoke_openai, LSP tools, code search

12- **Specialist Agents**: explore, dewey, frontend, delphi, multimodal, document_writer

13

14### Agent Tools (via MCP)

15- `agent_spawn(prompt, agent_type, description)` - Spawn background agent with full tool access

16- `agent_output(task_id, block)` - Get results (block=True to wait)

17- `agent_progress(task_id)` - Check real-time progress

18- `agent_list()` - Overview of all running agents

19- `agent_cancel(task_id)` - Stop a running agent

20

21### Agent Types

22- `explore` - Codebase search, structural analysis (Gemini 3 Flash)

23- `dewey` - Documentation research, web search (Gemini 3 Flash + Web)

24- `frontend` - UI/UX implementation (Gemini 3 Pro High)

25- `delphi` - Strategic advice, architecture review (GPT-5.2 Medium)

26- `multimodal` - Visual analysis, screenshots (Gemini 3 Flash Vision)

27- `document_writer` - Technical documentation (Gemini 3 Flash)

28

29### Parallel Execution (MANDATORY)

30 For ANY task with 2+ independent steps:

31 1. **Immediately use agent_spawn** for each independent component

32 2. Fire all agents simultaneously in ONE response, don't wait

33 3. Monitor with agent_progress, collect with agent_output

34

35### Trigger Commands

36- **IRONSTAR** / **IRS**: Maximum parallel execution - spawn agents aggressively for every subtask

37- **ULTRATHINK**: Engage exhaustive deep reasoning, multi-dimensional analysis

38- **SEARCH**: Maximize search effort across codebase and external resources

39- **ANALYZE**: Deep analysis mode with delphi consultation for complex issues

40

41### Native Subagent Benefits

42- ✅ Auto-delegation (no manual /stravinsky invocation)

43- ✅ Context isolation (orchestrator runs as subagent)

44- ✅ Full MCP tool access (agent_spawn, invoke_gemini/openai, LSP, etc.)

45- ✅ Multi-model routing (Gemini for UI/research, GPT for strategy)

46"""

47

48 COMMAND_STRAVINSKY = """---

49 description: stravinsky Orchestrator - Parallel agent execution for complex workflows.

50---

51

52## CRITICAL: USE STRAVINSKY MCP TOOLS

53

54 You MUST use the Stravinsky MCP server tools for ALL file reading, searching, and parallel work.

55

56### MANDATORY TOOL USAGE:

57

58**For ANY file reading or searching:**

59```

60 stravinsky:agent_spawn(

61 prompt="Read and analyze [file path]. Return: [what you need]",

62 agent_type="explore",

63 description="Read [file]"

64)

65```

66

67**For documentation/library research:**

68```

69 stravinsky:agent_spawn(

70 prompt="Find documentation for [topic]",

71 agent_type="dewey",

72 description="Research [topic]"

73)

74```

75

76**For 2+ independent tasks (ALWAYS parallel):**

77```

78// Fire ALL at once in ONE response - NEVER sequential

79 stravinsky:agent_spawn(prompt="Task 1...", agent_type="explore", description="Task 1")

80 stravinsky:agent_spawn(prompt="Task 2...", agent_type="explore", description="Task 2")

81 stravinsky:agent_spawn(prompt="Task 3...", agent_type="dewey", description="Task 3")

82// Then immediately continue - don't wait

83```

84

85**To get results:**

86```

87 stravinsky:agent_output(task_id="[id]", block=true)

88```

89

90### Recommended Tool Usage:

91- For file operations within agents: Use standard Read/Edit tools

92- For parallel agent spawning: Use stravinsky:agent_spawn (supports nesting, unlike native Task tool)

93- For collecting results: Use stravinsky:agent_output

94- For monitoring agents: Use stravinsky:agent_list

95

96### Native Subagent Integration:

97- Stravinsky orchestrator configured as native Claude Code subagent (.claude/agents/stravinsky.md)

98- Native subagents CAN call Stravinsky MCP tools (agent_spawn, invoke_gemini, etc.)

99- This enables auto-delegation without manual /stravinsky invocation

100

101### Execution Modes:

102- `ironstar` / `irs` - Maximum parallel execution (10+ agents)

103- `ultrathink` - Deep reasoning with delphi consultation

104- `search` - Exhaustive multi-agent search

105

106**Your FIRST action must be spawning agents, not using Read/Search tools.**

107"""

108

109 COMMAND_PARALLEL = """---

110 description: Execute a task with multiple parallel agents for speed.

111---

112

113 Use the stravinsky MCP tools to execute this task with PARALLEL AGENTS.

114

115**MANDATORY:** For the following task items, spawn a SEPARATE `agent_spawn` call for EACH independent item. Do not work on them sequentially - fire all agents simultaneously:

116

117$ARGUMENTS

118

119 After spawning all agents:

120 1. Use `agent_list` to show running agents

121 2. Use `agent_progress(task_id)` to monitor each

122 3. Collect results with `agent_output(task_id, block=True)` when ready

123"""

124

125 COMMAND_CONTEXT = """---

126 description: Refresh project situational awareness (Git, Rules, Top Todos).

127---

128

129 Call the `get_project_context` tool to retrieve the current Git branch, modified files, local project rules from `.claude/rules/`, and any pending `[ ]` todos in the current scope.

130"""

131

132 COMMAND_HEALTH = """---

133 description: Perform a comprehensive system health and dependency check.

134---

135

136 Call the `get_system_health` tool to verify that all CLI dependencies (rg, fd, sg, tsc, etc.) are installed and that authentication for Gemini and OpenAI is active.

137"""

138

139 COMMAND_DELPHI = """---

140 description: Consult the delphi Strategic Advisor for architecture and hard debugging.

141---

142

143 Use the `delphi` prompt to analyze the current problem. This triggers a GPT-based consulting phase focused on strategic reasoning, architectural trade-offs, and root-cause analysis for difficult bugs.

144

145**When to use delphi:**

146- Complex architecture design decisions

147- After 2+ failed fix attempts

148- Multi-system tradeoffs

149- Security/performance concerns

150- Unfamiliar code patterns

151"""

152

153 COMMAND_LIST = """---

154 description: List all active and recent background agent tasks.

155---

156

157 Call the `agent_list` tool to see an overview of all currently running and completed background agents, including their Task IDs and statuses.

158"""

159

160 COMMAND_DEWEY = """---

161 description: Trigger dewey for documentation research and implementation examples.

162---

163

164 Use the `dewey` prompt to find evidence and documentation for the topic at hand. dewey specializes in multi-repository search and official documentation retrieval.

165

166**When to use dewey:**

167- Unfamiliar npm/pip/cargo packages

168- "How do I use [library]?"

169- "What's the best practice for [framework feature]?"

170- Finding OSS implementation examples

171"""

172

173 COMMAND_VERSION = """---

174 description: Returns the current version and diagnostic info for stravinsky.

175---

176

177 Display the stravinsky MCP version, registered hooks, available agents, and system health status.

178"""

179

180 SLASH_COMMANDS = {

181 "stravinsky.md": COMMAND_STRAVINSKY,

182 "parallel.md": COMMAND_PARALLEL,

183 "list.md": COMMAND_LIST,

184 "context.md": COMMAND_CONTEXT,

185 "health.md": COMMAND_HEALTH,

186 "delphi.md": COMMAND_DELPHI,

187 "dewey.md": COMMAND_DEWEY,

188 "version.md": COMMAND_VERSION,

189}